mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
In case of a preceding error, there is no guarantee that the SIL is valid. Therefore just bail in this case. rdar://118521842
8 lines
337 B
Swift
8 lines
337 B
Swift
// RUN: %target-swift-frontend -parse-as-library -emit-sil %s -o /dev/null -verify
|
|
|
|
// Don't crash in the initializeStaticGlobalsPass when the global is not valid.
|
|
|
|
let f: @convention(c) () -> Void = { // expected-error {{a C function pointer cannot be formed from a closure that captures generic parameters}}
|
|
func g<T>(_ x: T) {}
|
|
}
|