We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents e813455 + fd4bcdc commit 8483524Copy full SHA for 8483524
validation-test/compiler_crashers_2_fixed/0095-rdar30154791.swift
@@ -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