blob: 89477d544ef44735bb3d0dd00f7d289466d4f689 [file] [log] [blame]
// RUN: %target-swift-frontend %s -enable-ownership-stripping-after-serialization -emit-sil -verify
class TuringMachine {
func halt() -> Never {
repeat { } while true
}
}
func diagnose_missing_return_no_error_after_noreturn_method() -> Int {
TuringMachine().halt()
} // no error
func testUnreachableAfterNoReturnMethod() -> Int {
TuringMachine().halt(); // expected-note{{a call to a never-returning function}}
return 0; // expected-warning {{will never be executed}}
}