Skip to content

Commit 8483524

Browse files
authored
Merge pull request #9503 from DougGregor/rdar30154791-testcase
Add fixed crasher for rdar://problem/30154791.
2 parents e813455 + fd4bcdc commit 8483524

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
// RUN: not %target-swift-frontend %s -typecheck
2+
3+
struct X<T> {}
4+
struct Y<T> {}
5+
6+
protocol P {
7+
associatedtype T = X<U>
8+
associatedtype U
9+
10+
func foo() -> T
11+
}
12+
13+
protocol Q: P {
14+
func bar() -> T
15+
func bas() -> U
16+
}
17+
18+
extension P {
19+
func foo() -> X<U> { fatalError() }
20+
}
21+
22+
extension Q {
23+
func foo() -> Y<U> { fatalError() }
24+
func bar() -> Y<U> { fatalError() }
25+
}
26+
27+
struct S {}
28+
29+
extension S {
30+
func bas() -> Int {}
31+
}
32+
extension S: Q {}
33+
34+
let x: Y = S().foo()
35+

0 commit comments

Comments
 (0)