mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Such destroys mark the lifetime end of their operands along their availability boundary. They are currently inserted in this test case by the ClosureLifetimeFixup pass, but in the fullness of time they will be present for every value which is not explicitly destroyed (that's what complete OSSA lifetimes is mostly about). Currently, such destroys are diagnosed by DiagnoseUnreachable. Fix the diagnostic pass not to diagnose these valid instructions. rdar://137960229
10 lines
185 B
Swift
10 lines
185 B
Swift
// RUN: %target-swift-frontend -c %s -verify
|
|
|
|
func testFatalError(_ message: @autoclosure () -> String = String()) -> Never {
|
|
Swift.fatalError()
|
|
}
|
|
|
|
func test() {
|
|
testFatalError()
|
|
}
|