@@ -1441,20 +1441,14 @@ static CanTupleType getLoweredTupleType(TypeConverter &tc,
1441
1441
1442
1442
assert (!isa<LValueType>(substEltType) &&
1443
1443
" lvalue types cannot exist in function signatures" );
1444
-
1445
- CanType loweredSubstEltType;
1446
- if (auto substLV = dyn_cast<InOutType>(substEltType)) {
1447
- SILType silType = tc.getLoweredType (origType.getWithoutSpecifierType (),
1448
- substLV.getObjectType ());
1449
- loweredSubstEltType = CanInOutType::get (silType.getSwiftRValueType ());
1450
-
1451
- } else {
1452
- // If the original type was an archetype, use that archetype as
1453
- // the original type of the element --- the actual archetype
1454
- // doesn't matter, just the abstraction pattern.
1455
- SILType silType = tc.getLoweredType (origEltType, substEltType);
1456
- loweredSubstEltType = silType.getSwiftRValueType ();
1457
- }
1444
+ assert (!isa<InOutType>(substEltType) &&
1445
+ " inout cannot appear in tuple element type here" );
1446
+
1447
+ // If the original type was an archetype, use that archetype as
1448
+ // the original type of the element --- the actual archetype
1449
+ // doesn't matter, just the abstraction pattern.
1450
+ SILType silType = tc.getLoweredType (origEltType, substEltType);
1451
+ CanType loweredSubstEltType = silType.getSwiftRValueType ();
1458
1452
1459
1453
changed = (changed || substEltType != loweredSubstEltType);
1460
1454
0 commit comments