Skip to content

Commit b42585b

Browse files
committed
Add crashing test case from SR-5546.
1 parent b6b983a commit b42585b

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
// RUN: not --crash %target-swift-frontend %s -typecheck
2+
public struct Foo<A, B, C> {}
3+
4+
public protocol P {
5+
associatedtype PA
6+
associatedtype PB = Never
7+
associatedtype PC = Never
8+
9+
typealias Context = Foo<PA, PB, PC>
10+
11+
func f1(_ x: Context, _ y: PA)
12+
func f2(_ x: Context, _ y: PB)
13+
func f3(_ x: Context, _ y: PC)
14+
func f4(_ x: Context)
15+
}
16+
17+
public extension P {
18+
public func f1(_ x: Context, _ y: PA) {
19+
}
20+
public func f2(_ x: Context, _ y: PB) {
21+
}
22+
public func f3(_ x: Context, _ y: PC) {
23+
}
24+
public func f4(_ x: Context) {
25+
}
26+
}
27+
28+
public struct S: P {
29+
public typealias PA = String
30+
public typealias PB = Int
31+
32+
public func f1(_ x: Context, _ y: PA) {
33+
}
34+
public func f2(_ x: Context, _ y: PB) {
35+
}
36+
}

0 commit comments

Comments
 (0)