Files
swift-mirror/test/Constraints/rdar107724970.swift

18 lines
441 B
Swift
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
// 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
}
}
}