Skip to content

Commit db79d06

Browse files
committed
Break a cycle
1 parent 5a7040e commit db79d06

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/Sema/TypeCheckDecl.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -674,7 +674,9 @@ static void checkRedeclaration(ASTContext &ctx, ValueDecl *current) {
674674
ModuleDecl *currentModule = current->getModuleContext();
675675
for (auto other : otherDefinitions) {
676676
// Skip invalid declarations and ourselves.
677-
if (current == other || other->isInvalid())
677+
//
678+
// FIXME: Breaking a cycle here with hasInterfaceType() is bogus.
679+
if (current == other || (other->hasInterfaceType() && other->isInvalid()))
678680
continue;
679681

680682
// Skip declarations in other modules.

0 commit comments

Comments
 (0)