Skip to content

Commit d5bf5e3

Browse files
committed
Sema: Add another test that passes with -enable-experimental-associated-type-inference
1 parent e29c3a9 commit d5bf5e3

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
// RUN: %target-typecheck-verify-swift -enable-experimental-associated-type-inference
2+
// RUN: not %target-typecheck-verify-swift
3+
4+
protocol IP {
5+
associatedtype E
6+
7+
func next() -> E?
8+
}
9+
10+
protocol S {
11+
associatedtype I: IP
12+
associatedtype E where E == I.E
13+
14+
func makeI() -> I
15+
}
16+
17+
struct G: S {
18+
struct I: IP {
19+
func next() -> Int? {}
20+
}
21+
22+
func makeI() -> I {}
23+
}

0 commit comments

Comments
 (0)