@@ -19,6 +19,13 @@ public protocol StrongProtoWithWeakLinkedAssoc {
1919 @_weakLinked associatedtype Assoc : P
2020}
2121
22+ public struct LibConformsToP : P { }
23+
24+ public protocol StrongProtoWithNewAssoc {
25+ @available ( macOS 10 . 50 , * )
26+ associatedtype NewerAssoc : P = LibConformsToP
27+ }
28+
2229@available ( macOS 10 . 50 , * )
2330public protocol WeakProtoWithAssoc {
2431 associatedtype Assoc : P
@@ -40,11 +47,18 @@ struct ConformsToStrongProtoWithAssoc: StrongProtoWithAssoc {
4047 typealias Assoc = ConformsToP
4148}
4249
50+
4351// CHECK: @"$s7Library30StrongProtoWithWeakLinkedAssocP0G0AC_AA1PTn" = extern_weak global %swift.protocol_requirement, align 4
4452struct ConformsToStrongProtoWithWeakLinkedAssoc : StrongProtoWithWeakLinkedAssoc {
4553 typealias Assoc = ConformsToP
4654}
4755
56+ // CHECK: @"$s7Library23StrongProtoWithNewAssocP05NewerF0AC_AA1PTn" = extern_weak global %swift.protocol_requirement, align 4
57+ // CHECK: @"$s10NewerAssoc7Library018StrongProtoWithNewB0PTl" = extern_weak global %swift.protocol_requirement, align 4
58+ struct ConformsToStrongProtoWithNewAssoc : StrongProtoWithNewAssoc {
59+ typealias NewAssoc = ConformsToP
60+ }
61+
4862// CHECK: @"$s7Library18WeakProtoWithAssocP0E0AC_AA1PTn" = extern_weak global %swift.protocol_requirement, align 4
4963@available ( macOS 10 . 50 , * )
5064struct ConformsToWeakProtoWithAssoc : WeakProtoWithAssoc {
0 commit comments