mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
AST: Clean up getMemberSubstitutions() and friends
Rename the old getMemberSubstitutions() to getContextSubstitutions() and add a new getMemberSubstitutions() that takes a ValueDecl, rather than the member's DeclContext. This new method forwards generic parameters if the member is a generic function.
This commit is contained in:
@@ -385,9 +385,8 @@ public:
|
||||
/// Given part of the witness's interface type, produce its
|
||||
/// substitution according to the witness substitutions.
|
||||
CanType getSubstWitnessInterfaceType(CanType type) {
|
||||
return SubstSelfType->getTypeOfMember(SGM.SwiftModule, type,
|
||||
WitnessStorage->getDeclContext())
|
||||
->getCanonicalType();
|
||||
auto subs = SubstSelfType->getMemberSubstitutions(WitnessStorage);
|
||||
return type.subst(SGM.SwiftModule, subs)->getCanonicalType();
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user