EnumerationSwift

    Never

    The return type of functions that do not return normally, that is, a type with no values.

    @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")
    }

    Members

    Instance Properties

    Type Operators