1
- // RUN: %target-typecheck-verify-swift -swift-version 4
1
+ // RUN: %target-typecheck-verify-swift -swift-version 4 -print-ast %s | %FileCheck %s
2
2
3
3
func needsSameType< T> ( _: T . Type , _: T . Type ) { }
4
4
@@ -91,7 +91,11 @@ protocol SR10831_P1 {
91
91
protocol SR10831_P2 : SR10831_P1 where A == G < G < C ? > > { }
92
92
protocol SR10831_P3 : SR10831_P2 where B == Int , C == G < B > { }
93
93
94
- struct SR10831 : SR10831_P3 { } // OK
94
+ struct SR10831 : SR10831_P3 { // OK
95
+ // CHECK: typealias A = G<G<G<Int>?>>
96
+ // CHECK: typealias B = Int
97
+ // CHECK: typealias C = G<Int>
98
+ }
95
99
96
100
97
101
// SR-11671:
@@ -102,6 +106,12 @@ protocol SR11671_P1 {
102
106
protocol SR11671_P2 : SR11671_P1 where A == Self { }
103
107
protocol SR11671_P3 : SR11671_P2 where B == G < Self ? > { }
104
108
105
- struct SR11671_S1 : SR11671_P3 { } // OK
109
+ struct SR11671_S1 : SR11671_P3 { // OK
110
+ // CHECK: typealias A = SR11671_S1
111
+ // CHECK: typealias B = G<SR11671_S1?>
112
+ }
106
113
107
- struct SR11671_S2 < T, U> : SR11671_P3 { } // OK
114
+ struct SR11671_S2 < T, U> : SR11671_P3 { // OK
115
+ // CHECK: typealias A = SR11671_S2<T, U>
116
+ // CHECK: typealias B = G<SR11671_S2<T, U>?>
117
+ }
0 commit comments