Skip to content

Commit de3cf4d

Browse files
committed
Sema: Visit getter throws type in ReferencedAssociatedTypesRequest
1 parent b300068 commit de3cf4d

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

lib/Sema/AssociatedTypeInference.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4612,5 +4612,13 @@ ReferencedAssociatedTypesRequest::evaluate(Evaluator &eval,
46124612
reqTy->getCanonicalType().walk(walker);
46134613
}
46144614

4615+
if (auto *asd = dyn_cast<AbstractStorageDecl>(req)) {
4616+
if (auto getter = asd->getEffectfulGetAccessor()) {
4617+
if (Type thrownErrorType = getter->getThrownInterfaceType()) {
4618+
thrownErrorType->getCanonicalType().walk(walker);
4619+
}
4620+
}
4621+
}
4622+
46154623
return assocTypes;
46164624
}

0 commit comments

Comments
 (0)