Skip to content

Commit bb34620

Browse files
committed
Sema: Validate extension if needed in isExtensionApplied()
We're looking at the generic signature of the extension, so it must have been validated at this point. I don't have a test case for this and maybe it never came up, but nothing forces it to be validated here so let's make it more robust by doing it explicitly.
1 parent f253da0 commit bb34620

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/Sema/CSGen.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3704,6 +3704,7 @@ bool swift::isExtensionApplied(DeclContext &DC, Type BaseTy,
37043704
return true;
37053705

37063706
TypeChecker *TC = &createTypeChecker(DC.getASTContext());
3707+
TC->validateExtension(const_cast<ExtensionDecl *>(ED));
37073708

37083709
ConstraintSystemOptions Options;
37093710
ConstraintSystem CS(*TC, &DC, Options);

0 commit comments

Comments
 (0)