mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
vanish single tuple on lowering verification
This commit is contained in:
@@ -3012,6 +3012,9 @@ bool TypeConverter::visitAggregateLeaves(
|
||||
std::optional<unsigned> index;
|
||||
std::tie(ty, origTy, field, index) = popFromWorklist();
|
||||
assert(!field || !index && "both field and index!?");
|
||||
if (auto origEltTy = origTy.getVanishingTupleElementPatternType()) {
|
||||
origTy = *origEltTy;
|
||||
}
|
||||
if (isAggregate(ty) && !isLeafAggregate(ty, origTy, field, index)) {
|
||||
if (auto packTy = dyn_cast<SILPackType>(ty)) {
|
||||
for (auto packIndex : indices(packTy->getElementTypes())) {
|
||||
|
||||
@@ -31,3 +31,9 @@ blackHole(G<Int, String>.self)
|
||||
let g = G<Int, String, Float>()
|
||||
blackHole(g.makeTuple1())
|
||||
blackHole(g.makeTuple2())
|
||||
|
||||
struct VariadicOptionalTuple<each V> {
|
||||
var v: (repeat (each V)?)
|
||||
}
|
||||
|
||||
func useVOT(_: VariadicOptionalTuple<String>) {}
|
||||
|
||||
Reference in New Issue
Block a user