The return type of functions that do not return normally, that is, a type with no values.
SDK
- Xcode 8.0+
Framework
- Swift Standard Library
Declaration
@frozen enum Never
Overview
Use Never
as the return type when declaring a closure, function, or method that unconditionally throws an error, traps, or otherwise does not terminate.
func crashAndBurn() -> Never {
fatalError("Something very, very bad happened")
}