-
Notifications
You must be signed in to change notification settings - Fork 10.4k
/
Copy pathissue-52042.swift
37 lines (30 loc) · 1.38 KB
/
issue-52042.swift
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
// RUN: %target-swift-frontend -debug-generic-signatures -typecheck %s 2>&1 | %FileCheck %s
// https://github.com/apple/swift/issues/52042
protocol R {}
protocol Q {
associatedtype Assoc
}
// CHECK-LABEL: .P1@
// CHECK-LABEL: Requirement signature: <Self where Self.[P1]T == Self.[P1]U.[P1]U, Self.[P1]U : P1, Self.[P1]U : Q, Self.[P1]U == Self.[P1]T.[P1]U, Self.[P1]U.[Q]Assoc : R>
protocol P1 {
associatedtype T where T == U.U
associatedtype U : P1, Q where U.Assoc : R, U == T.U
}
// CHECK-LABEL: .P2@
// CHECK-LABEL: Requirement signature: <Self where Self.[P2]T == Self.[P2]U.[P2]U, Self.[P2]U : P2, Self.[P2]U : Q, Self.[P2]U == Self.[P2]T.[P2]U, Self.[P2]U.[Q]Assoc : R>
protocol P2 {
associatedtype T : P2 where T == U.U
associatedtype U : P2, Q where U.Assoc : R, U == T.U
}
// CHECK-LABEL: .P3@
// CHECK-LABEL: Requirement signature: <Self where Self.[P3]T : Q, Self.[P3]T == Self.[P3]U.[P3]U, Self.[P3]U : P3, Self.[P3]U == Self.[P3]T.[P3]U, Self.[P3]T.[Q]Assoc : R>
protocol P3 {
associatedtype T : Q where T.Assoc : R, T == U.U
associatedtype U : P3 where U == T.U
}
// CHECK-LABEL: .P4@
// CHECK-LABEL: Requirement signature: <Self where Self.[P4]T : Q, Self.[P4]T == Self.[P4]U.[P4]U, Self.[P4]U : P4, Self.[P4]U == Self.[P4]T.[P4]U, Self.[P4]T.[Q]Assoc : R>
protocol P4 {
associatedtype T : P4, Q where T.Assoc : R, T == U.U
associatedtype U : P4 where U.Assoc : R, U == T.U
}