[swift-users] Mysterious “Will never be executed” warning

Rudolf Adamkovič salutis at me.com
Fri Jun 2 10:48:35 CDT 2017


I'm trying to understand "Will never be executed" warning here:

protocol FatalErrorReporterInterface {

    func fail(_ message: String) -> Never

}

final class FatalErrorReporter: FatalErrorReporterInterface {

    // This line emits "Will never be executed" warning
    func fail(_ message: String) -> Never {
        fatalError(message)
    }

}
Yet another compiler bug?

https://stackoverflow.com/questions/44332850/mysterious-will-never-be-executed-warning

R+
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-users/attachments/20170602/4d43a1d2/attachment.html>


More information about the swift-users mailing list