Skip to content

Commit b3b24a7

Browse files
committed
[Test] Add a compiler crasher test case for unsupported opened existential
types.
1 parent 76e6156 commit b3b24a7

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
// RUN: not --crash %target-swift-frontend -emit-ir %s
2+
3+
func fetch() {
4+
sryMap { return "" }
5+
.napError{ $0.abc() }
6+
}
7+
8+
func sryMap<String>(_ transform: () -> String) -> SryMap<String> {
9+
fatalError()
10+
}
11+
12+
protocol MyError {}
13+
extension MyError {
14+
func abc() -> Void { }
15+
}
16+
17+
protocol MyProto {
18+
associatedtype Failure
19+
}
20+
extension MyProto {
21+
func napError(_ transform: (Self.Failure) -> Void) {}
22+
}
23+
24+
struct SryMap<Output> : MyProto {
25+
typealias Failure = MyError & SomeClass<Output>
26+
}
27+
28+
class SomeClass<T> {}

0 commit comments

Comments
 (0)