Skip to content

Commit 26fddb7

Browse files
committed
Sema: bindExtensions() doesn't need to diagnose extensions right away
We'll instead diagnose them when we type check their primary file, since typeCheckDecl() calls validateExtension() whcih calls bindExtension().
1 parent f466aeb commit 26fddb7

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

lib/Sema/TypeChecker.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -467,10 +467,8 @@ static void bindExtensions(SourceFile &SF, TypeChecker &TC) {
467467
}
468468
} while(changed);
469469

470-
// Phase 3 - anything that remains on the worklist cannot be resolved, which
471-
// means its invalid. Diagnose.
472-
for (auto *ext : worklist)
473-
bindExtensionDecl(ext, TC);
470+
// Any remaining extensions are invalid. They will be diagnosed later by
471+
// typeCheckDecl().
474472
}
475473

476474
void TypeChecker::bindExtension(ExtensionDecl *ext) {

0 commit comments

Comments
 (0)