Files
swift-mirror/validation-test/stdlib/AssertDiagnosticsSIL.swift
Luciano Almeida ddeb1929c4 [DiagnosticQol][SR-14505] Use DeclDescriptive kind in missing return data flow diagnostics (#36952)
* [Diagnostics] Use DeclDescriptiveKind on data flow diagnostics to improve diagnostic message

* [tests] Add regression tests to SILOptimizer/return.swift

* [tests] Adapt other tests to changes of SR-14505

* [Diagnostics] Adapt message for missing return diagnostics, remove article

* [Diagnostics] Adapt message for missing return diagnostics to have a note with fix

* [tests] Adjust tests in validation suit
2021-04-20 08:16:32 -03:00

8 lines
269 B
Swift

// RUN: %target-swift-frontend %s -emit-sil -verify
func assertionFailure_isNotNoreturn() -> Int {
_ = 0 // Don't implicitly return the assertionFailure call.
assertionFailure("")
} // expected-error {{missing return in global function expected to return 'Int'}}