[IDE] Fix another GenericFunctionType subst crasher #38503
[IDE] Use method result type for getTypeOfMember call
73027925
[AST] Reject GenericFunctionType in TypeBase::getTypeOfMember
d4c25f55
rintaro
approved these changes
on 2021-07-20
hamishknight
deleted the another-one-bites-the-subst branch 4 years ago
Assignees
No one assigned
When matching methods for the conforming types SourceKit request, we were using the method's interface type in a call to
TypeBase::getTypeOfMember
, which could lead to crashes when callingsubst
with a GenericFunctionType. Instead, pass the result type only, as that's all we want anyway.Then change
TypeBase::getTypeOfMember
to enforce that a GenericFunctionType isn't passed as thememberType
parameter to avoid other callers making the same mistake.rdar://77259607