Skip to content

Commit bc630b7

Browse files
committed
[Type checker] Get all conformances for externally-defined types.
IR generation depends on these when it emits type metadata.
1 parent 3018bec commit bc630b7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/Sema/TypeChecker.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -541,8 +541,10 @@ static void typeCheckFunctionsAndExternalDecls(SourceFile &SF, TypeChecker &TC)
541541
TC.checkFunctionErrorHandling(AFD);
542542
continue;
543543
}
544-
if (isa<NominalTypeDecl>(decl))
544+
if (auto nominal = dyn_cast<NominalTypeDecl>(decl)) {
545+
(void)nominal->getAllConformances();
545546
continue;
547+
}
546548
if (isa<VarDecl>(decl))
547549
continue;
548550
llvm_unreachable("Unhandled external definition kind");

0 commit comments

Comments
 (0)