mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
15 lines
421 B
Swift
15 lines
421 B
Swift
// RUN: %target-typecheck-verify-swift
|
|
|
|
protocol EmptyProtocol {}
|
|
struct EmptyStruct {}
|
|
|
|
// https://github.com/apple/swift/issues/43674
|
|
// Coercion in single expression closure with invalid signature caused segfault
|
|
do {
|
|
struct G<T: EmptyProtocol> {}
|
|
|
|
let _ = { (_: G<EmptyStruct>) -> Void in // expected-error{{type 'EmptyStruct' does not conform to protocol 'EmptyProtocol'}}
|
|
EmptyStruct() as EmptyStruct
|
|
}
|
|
}
|