Skip to content

Commit 37bec58

Browse files
committed
Fix an indexing bug when binding tuple parameters with non-initial
parameter packs.
1 parent 2fc2273 commit 37bec58

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/SILGen/SILGenProlog.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,8 @@ class EmitBBArguments : public CanTypeVisitor<EmitBBArguments,
377377
} else {
378378
assert(init);
379379
expandPack(origEltType, substEltTypes, elt.getSubstIndex(),
380-
eltInits, elements);
380+
eltInits.slice(elt.getSubstIndex(), substEltTypes.size()),
381+
elements);
381382
}
382383
});
383384

0 commit comments

Comments
 (0)