|
| 1 | +// RUN: %target-swift-emit-silgen -disable-availability-checking %s | %FileCheck %s |
| 2 | + |
| 3 | +protocol P<A> { |
| 4 | + associatedtype A |
| 5 | +} |
| 6 | + |
| 7 | +protocol Q<B> { |
| 8 | + associatedtype B |
| 9 | +} |
| 10 | + |
| 11 | +// All of these should have unique mangling. |
| 12 | +func overload(_: any P<Int> & Q<String>) {} |
| 13 | +func overload(_: any P<Float> & Q<String>) {} |
| 14 | +func overload(_: any P & Q<String>) {} |
| 15 | +func overload(_: any P<Int> & Q<Bool>) {} |
| 16 | +func overload(_: any P<Float> & Q<Bool>) {} |
| 17 | +func overload(_: any P & Q<Bool>) {} |
| 18 | +func overload(_: any P<Int> & Q) {} |
| 19 | +func overload(_: any P<Float> & Q) {} |
| 20 | +func overload(_: any P & Q) {} |
| 21 | +func overload(_: any P<Int>) {} |
| 22 | +func overload(_: any P<Float>) {} |
| 23 | +func overload(_: any P) {} |
| 24 | +func overload(_: any Q<Bool>) {} |
| 25 | +func overload(_: any Q) {} |
| 26 | + |
| 27 | +// CHECK-LABEL: sil hidden [ossa] @$s37parameterized_existential_composition8overloadyyAA1P_AA1QpSi1AAaCPRts_SS1BAaDPRtsXPF : $@convention(thin) (@in_guaranteed any P<Int> & Q<String>) -> () { |
| 28 | +// CHECK-LABEL: sil hidden [ossa] @$s37parameterized_existential_composition8overloadyyAA1P_AA1QpSf1AAaCPRts_SS1BAaDPRtsXPF : $@convention(thin) (@in_guaranteed any P<Float> & Q<String>) -> () { |
| 29 | +// CHECK-LABEL: sil hidden [ossa] @$s37parameterized_existential_composition8overloadyyAA1P_AA1QpSS1BAaDPRts_XPF : $@convention(thin) (@in_guaranteed any P & Q<String>) -> () { |
| 30 | +// CHECK-LABEL: sil hidden [ossa] @$s37parameterized_existential_composition8overloadyyAA1P_AA1QpSi1AAaCPRts_Sb1BAaDPRtsXPF : $@convention(thin) (@in_guaranteed any P<Int> & Q<Bool>) -> () { |
| 31 | +// CHECK-LABEL: sil hidden [ossa] @$s37parameterized_existential_composition8overloadyyAA1P_AA1QpSf1AAaCPRts_Sb1BAaDPRtsXPF : $@convention(thin) (@in_guaranteed any P<Float> & Q<Bool>) -> () { |
| 32 | +// CHECK-LABEL: sil hidden [ossa] @$s37parameterized_existential_composition8overloadyyAA1P_AA1QpSb1BAaDPRts_XPF : $@convention(thin) (@in_guaranteed any P & Q<Bool>) -> () { |
| 33 | +// CHECK-LABEL: sil hidden [ossa] @$s37parameterized_existential_composition8overloadyyAA1P_AA1QpSi1AAaCPRts_XPF : $@convention(thin) (@in_guaranteed any P<Int> & Q) -> () { |
| 34 | +// CHECK-LABEL: sil hidden [ossa] @$s37parameterized_existential_composition8overloadyyAA1P_AA1QpSf1AAaCPRts_XPF : $@convention(thin) (@in_guaranteed any P<Float> & Q) -> () { |
| 35 | +// CHECK-LABEL: sil hidden [ossa] @$s37parameterized_existential_composition8overloadyyAA1P_AA1QpF : $@convention(thin) (@in_guaranteed any P & Q) -> () { |
| 36 | +// CHECK-LABEL: sil hidden [ossa] @$s37parameterized_existential_composition8overloadyyAA1P_pSi1AAaCPRts_XPF : $@convention(thin) (@in_guaranteed any P<Int>) -> () { |
| 37 | +// CHECK-LABEL: sil hidden [ossa] @$s37parameterized_existential_composition8overloadyyAA1P_pSf1AAaCPRts_XPF : $@convention(thin) (@in_guaranteed any P<Float>) -> () { |
| 38 | +// CHECK-LABEL: sil hidden [ossa] @$s37parameterized_existential_composition8overloadyyAA1P_pF : $@convention(thin) (@in_guaranteed any P) -> () { |
| 39 | +// CHECK-LABEL: sil hidden [ossa] @$s37parameterized_existential_composition8overloadyyAA1Q_pSb1BAaCPRts_XPF : $@convention(thin) (@in_guaranteed any Q<Bool>) -> () { |
| 40 | +// CHECK-LABEL: sil hidden [ossa] @$s37parameterized_existential_composition8overloadyyAA1Q_pF : $@convention(thin) (@in_guaranteed any Q) -> () { |
0 commit comments