Skip to content

Commit 715b4c0

Browse files
committed
AST: Override TypeTransform::transformSubMap() in TypeSubstituter
1 parent 547cdb9 commit 715b4c0

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

lib/AST/TypeSubstitution.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -489,6 +489,8 @@ class TypeSubstituter : public TypeTransform<TypeSubstituter> {
489489
: level(level), IFS(IFS) {}
490490

491491
std::optional<Type> transform(TypeBase *type, TypePosition position);
492+
493+
SubstitutionMap transformSubstitutionMap(SubstitutionMap subs);
492494
};
493495

494496
}
@@ -624,6 +626,11 @@ TypeSubstituter::transform(TypeBase *type, TypePosition position) {
624626
level);
625627
}
626628

629+
SubstitutionMap TypeSubstituter::transformSubstitutionMap(SubstitutionMap subs) {
630+
// FIXME: Take level into account? Move level down into IFS?
631+
return subs.subst(IFS);
632+
}
633+
627634
Type Type::subst(SubstitutionMap substitutions,
628635
SubstOptions options) const {
629636
InFlightSubstitutionViaSubMap IFS(substitutions, options);

0 commit comments

Comments
 (0)