@@ -49,3 +49,33 @@ struct RequiresP<T: P> {}
49
49
// retroactive conformance to conform to Q.
50
50
func rdar46735592( _: RequiresP < UnconditionallyP < Y > > ) { }
51
51
// CHECK: sil hidden [ossa] @$s20mangling_retroactive12rdar46735592yyAA9RequiresPVyAA16UnconditionallyPVy12RetroactiveB1YVAI0F1A1QAAHPyHCg_GAlJ1PyHCg_GF
52
+
53
+ struct QImpl : Q { }
54
+ struct ConditionallyP < T> { }
55
+ extension ConditionallyP : P where T: Q { }
56
+
57
+ func useConditionallyP( _: RequiresP < ConditionallyP < QImpl > > ) { }
58
+ func useConditionallyP_retroactive( _: RequiresP < ConditionallyP < Y > > ) { }
59
+ // CHECK: sil hidden [ossa] @$s20mangling_retroactive17useConditionallyPyyAA9RequiresPVyAA0D1PVyAA5QImplVGGF
60
+ // CHECK: sil hidden [ossa] @$s20mangling_retroactive018useConditionallyP_B0yyAA9RequiresPVyAA0D1PVy12RetroactiveB1YVGAJ0F1A1PAiK1QAAHPyHC_HCg_GF
61
+
62
+ protocol Wrapper {
63
+ associatedtype Wrapped
64
+ }
65
+ struct WrapperImpl < Wrapped> : Wrapper { }
66
+
67
+ struct IndirectlyConditionallyP < T: Wrapper > { }
68
+ extension IndirectlyConditionallyP : P where T. Wrapped: Q { }
69
+
70
+ func useIndirectlyConditionallyP( _: RequiresP < IndirectlyConditionallyP < WrapperImpl < QImpl > > > ) { }
71
+ func useIndirectlyConditionallyP_retroactive( _: RequiresP < IndirectlyConditionallyP < WrapperImpl < Y > > > ) { }
72
+ // CHECK: sil hidden [ossa] @$s20mangling_retroactive27useIndirectlyConditionallyPyyAA9RequiresPVyAA0dE1PVyAA11WrapperImplVyAA5QImplVGGGF
73
+ // CHECK: sil hidden [ossa] @$s20mangling_retroactive028useIndirectlyConditionallyP_B0yyAA9RequiresPVyAA0dE1PVyAA11WrapperImplVy12RetroactiveB1YVGGAM0I1A1PAkN1QAAHPyHC_HCg_GF
74
+
75
+ struct IndirectlyConditionallyP2 < T> { }
76
+ extension IndirectlyConditionallyP2 : P where T: Wrapper , T. Wrapped: Q { }
77
+
78
+ func useIndirectlyConditionallyP2( _: RequiresP < IndirectlyConditionallyP < WrapperImpl < QImpl > > > ) { }
79
+ func useIndirectlyConditionallyP2_retroactive( _: RequiresP < IndirectlyConditionallyP < WrapperImpl < Y > > > ) { }
80
+ // CHECK: sil hidden [ossa] @$s20mangling_retroactive28useIndirectlyConditionallyP2yyAA9RequiresPVyAA0dE1PVyAA11WrapperImplVyAA5QImplVGGGF
81
+ // CHECK: sil hidden [ossa] @$s20mangling_retroactive029useIndirectlyConditionallyP2_B0yyAA9RequiresPVyAA0dE1PVyAA11WrapperImplVy12RetroactiveB1YVGGAM0J1A1PAkN1QAAHPyHC_HCg_GF
0 commit comments