Skip to content

Commit 7f6a8c6

Browse files
committed
Add regression test for fixed crasher
1 parent 5a3327c commit 7f6a8c6

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// RUN: %target-typecheck-verify-swift
2+
3+
protocol P {
4+
typealias A = () -> Void
5+
func f(_: Int) -> (Int, A)
6+
// expected-note@-1 {{protocol requires function 'f' with type '(Int) -> (Int, Self.A)' (aka '(Int) -> (Int, () -> ())')}}
7+
}
8+
9+
class C: P {
10+
// expected-error@-1 {{type 'C' does not conform to protocol 'P'}}
11+
// expected-note@-2 {{add stubs for conformance}}
12+
func f(_: Int) -> Int { fatalError() }
13+
// expected-note@-1 {{candidate has non-matching type '(Int) -> Int'}}
14+
}

0 commit comments

Comments
 (0)