Skip to content

Commit 39a220e

Browse files
committed
Demangler: Don't enter substitution for PackExpansionType
1 parent 3266a82 commit 39a220e

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

lib/Demangling/Demangler.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2392,7 +2392,6 @@ NodePointer Demangler::demangleArchetype() {
23922392
NodePointer PatternTy = popTypeAndGetChild();
23932393
NodePointer PackExpansionTy = createType(
23942394
createWithChildren(Node::Kind::PackExpansion, PatternTy, CountTy));
2395-
addSubstitution(PackExpansionTy);
23962395
return PackExpansionTy;
23972396
}
23982397
case 'P':

test/SILGen/pack_expansion_type.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,9 @@ func variadicMetatypes<each T>(_: repeat each T) {
4343
_ = ((repeat each T) -> ()).self
4444
_ = ((Int, repeat Array<each T>) -> ()).self
4545
}
46+
47+
// Mangling bugs with substitutions
48+
49+
// CHECK-LABEL: sil [ossa] @$s19pack_expansion_type18sameExpansionTwice2us05more_G02vsyxxQp_xxQpq_q_QptRvzRv_r0_lF : $@convention(thin) <each U, each V> (@pack_guaranteed Pack{repeat each U}, @pack_guaranteed Pack{repeat each U}, @pack_guaranteed Pack{repeat each V}) -> () {
50+
public func sameExpansionTwice<each U, each V>(us: repeat each U, more_us: repeat each U, vs: repeat each V) {}
51+

0 commit comments

Comments
 (0)