mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
18 lines
441 B
Swift
18 lines
441 B
Swift
// RUN: %target-typecheck-verify-swift
|
||
|
||
// rdar://107724970 – Make sure we don't crash.
|
||
enum E {
|
||
case e(Int)
|
||
}
|
||
func foo(_ x: E) {
|
||
// FIXME: We need to handle pattern arguments in a bunch of places in argument
|
||
// list diagnostic logic.
|
||
// https://github.com/apple/swift/issues/65062
|
||
let fn = { // expected-error {{unable to infer closure type without a type annotation}}
|
||
switch x {
|
||
case E.e(_, _):
|
||
break
|
||
}
|
||
}
|
||
}
|