File tree Expand file tree Collapse file tree 1 file changed +10
-10
lines changed Expand file tree Collapse file tree 1 file changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -2758,16 +2758,16 @@ bool TypeConverter::visitAggregateLeaves(
2758
2758
packIndex);
2759
2759
}
2760
2760
} else if (auto tupleTy = ty->getAs <TupleType>()) {
2761
- for ( unsigned tupleIndex = 0 , num = tupleTy-> getNumElements () ;
2762
- tupleIndex < num; ++tupleIndex) {
2763
- auto origElementTy = origTy. getTupleElementType (tupleIndex);
2764
- auto substElementTy =
2765
- tupleTy-> getElementType (tupleIndex)-> getCanonicalType ();
2766
- substElementTy =
2767
- computeLoweredRValueType (context , origElementTy, substElementTy);
2768
- insertIntoWorklist (substElementTy, origElementTy, nullptr ,
2769
- tupleIndex) ;
2770
- }
2761
+ unsigned tupleIndex = 0 ;
2762
+ origTy. forEachExpandedTupleElement (
2763
+ CanTupleType (tupleTy),
2764
+ [&]( auto origElementTy, auto substElementTy, auto element) {
2765
+ substElementTy =
2766
+ substOpaqueTypesWithUnderlyingTypes ( substElementTy, context);
2767
+ insertIntoWorklist (substElementTy , origElementTy, nullptr ,
2768
+ tupleIndex);
2769
+ ++ tupleIndex;
2770
+ });
2771
2771
} else if (auto *decl = ty->getStructOrBoundGenericStruct ()) {
2772
2772
for (auto *structField : decl->getStoredProperties ()) {
2773
2773
auto subMap = ty->getContextSubstitutionMap (&M, decl);
You can’t perform that action at this time.
0 commit comments