Skip to content

Commit f7d2470

Browse files
committed
Test fixed type witness synthesis
1 parent d699de6 commit f7d2470

File tree

1 file changed

+14
-4
lines changed

1 file changed

+14
-4
lines changed

test/Generics/protocol_where_clause.swift

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %target-typecheck-verify-swift -swift-version 4
1+
// RUN: %target-typecheck-verify-swift -swift-version 4 -print-ast %s | %FileCheck %s
22

33
func needsSameType<T>(_: T.Type, _: T.Type) {}
44

@@ -91,7 +91,11 @@ protocol SR10831_P1 {
9191
protocol SR10831_P2: SR10831_P1 where A == G<G<C?>> {}
9292
protocol SR10831_P3: SR10831_P2 where B == Int, C == G<B> {}
9393

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+
}
9599

96100

97101
// SR-11671:
@@ -102,6 +106,12 @@ protocol SR11671_P1 {
102106
protocol SR11671_P2: SR11671_P1 where A == Self {}
103107
protocol SR11671_P3: SR11671_P2 where B == G<Self?> {}
104108

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+
}
106113

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

Comments
 (0)