@@ -178,6 +178,8 @@ namespace {
178
178
class TypeClassifierBase
179
179
: public CanTypeVisitor<Impl, RetTy, AbstractionPattern, IsTypeExpansionSensitive_t>
180
180
{
181
+ using super =
182
+ CanTypeVisitor<Impl, RetTy, AbstractionPattern, IsTypeExpansionSensitive_t>;
181
183
Impl &asImpl () { return *static_cast <Impl*>(this ); }
182
184
protected:
183
185
TypeConverter &TC;
@@ -285,6 +287,15 @@ namespace {
285
287
RecursiveProperties::forOpaque ());
286
288
}
287
289
290
+ RetTy visit (CanType substType, AbstractionPattern origType,
291
+ IsTypeExpansionSensitive_t isSensitive) {
292
+ if (auto origEltType = origType.getVanishingTupleElementPatternType ()) {
293
+ return visit (substType, *origEltType, isSensitive);
294
+ }
295
+
296
+ return super::visit (substType, origType, isSensitive);
297
+ }
298
+
288
299
#define IMPL (TYPE, LOWERING ) \
289
300
RetTy visit##TYPE##Type(Can##TYPE##Type type, AbstractionPattern orig, \
290
301
IsTypeExpansionSensitive_t isSensitive) { \
@@ -2900,7 +2911,10 @@ TypeConverter::computeLoweredRValueType(TypeExpansionContext forExpansion,
2900
2911
LoweredRValueTypeVisitor (TypeConverter &TC,
2901
2912
TypeExpansionContext forExpansion,
2902
2913
AbstractionPattern origType)
2903
- : TC(TC), forExpansion(forExpansion), origType(origType) {}
2914
+ : TC(TC), forExpansion(forExpansion), origType(origType) {
2915
+ if (auto origEltType = origType.getVanishingTupleElementPatternType ())
2916
+ origType = *origEltType;
2917
+ }
2904
2918
2905
2919
// AST function types are turned into SIL function types:
2906
2920
// - the type is uncurried as desired
0 commit comments