File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -4168,15 +4168,20 @@ ClangTypeInfo AnyFunctionType::getCanonicalClangTypeInfo() const {
41684168ASTExtInfo
41694169AnyFunctionType::getCanonicalExtInfo (bool useClangFunctionType) const {
41704170 assert (hasExtInfo ());
4171+
4172+ CanGenericSignature genericSig;
4173+ if (auto *genericFnTy = dyn_cast<GenericFunctionType>(this ))
4174+ genericSig = genericFnTy->getGenericSignature ().getCanonicalSignature ();
4175+
41714176 Type globalActor = getGlobalActor ();
41724177 if (globalActor)
4173- globalActor = globalActor->getCanonicalType ( );
4178+ globalActor = globalActor->getReducedType (genericSig );
41744179
41754180 // When there is an explicitly-specified thrown error, canonicalize it's type.
41764181 auto bits = Bits.AnyFunctionType .ExtInfoBits ;
41774182 Type thrownError = getThrownError ();
41784183 if (thrownError) {
4179- thrownError = thrownError->getCanonicalType ( );
4184+ thrownError = thrownError->getReducedType (genericSig );
41804185
41814186 // - If the thrown error is `any Error`, the function throws and we
41824187 // drop the thrown error.
You can’t perform that action at this time.
0 commit comments