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 {
4168
4168
ASTExtInfo
4169
4169
AnyFunctionType::getCanonicalExtInfo (bool useClangFunctionType) const {
4170
4170
assert (hasExtInfo ());
4171
+
4172
+ CanGenericSignature genericSig;
4173
+ if (auto *genericFnTy = dyn_cast<GenericFunctionType>(this ))
4174
+ genericSig = genericFnTy->getGenericSignature ().getCanonicalSignature ();
4175
+
4171
4176
Type globalActor = getGlobalActor ();
4172
4177
if (globalActor)
4173
- globalActor = globalActor->getCanonicalType ( );
4178
+ globalActor = globalActor->getReducedType (genericSig );
4174
4179
4175
4180
// When there is an explicitly-specified thrown error, canonicalize it's type.
4176
4181
auto bits = Bits.AnyFunctionType .ExtInfoBits ;
4177
4182
Type thrownError = getThrownError ();
4178
4183
if (thrownError) {
4179
- thrownError = thrownError->getCanonicalType ( );
4184
+ thrownError = thrownError->getReducedType (genericSig );
4180
4185
4181
4186
// - If the thrown error is `any Error`, the function throws and we
4182
4187
// drop the thrown error.
You can’t perform that action at this time.
0 commit comments