[swift-users] Mysterious “Will never be executed” warning
Jordan Rose
jordan_rose at apple.com
Fri Jun 2 11:20:23 CDT 2017
Sure looks like one to me. In particular, it looks like SR-2729 <https://bugs.swift.org/browse/SR-2729>.
(I suspect this is because calling the method through the protocol generates a bit of wrapper code that then calls the original method; that wrapper code doesn’t have a location of its own.)
Sorry for the trouble,
Jordan
> On Jun 2, 2017, at 08:48, Rudolf Adamkovič via swift-users <swift-users at swift.org> wrote:
>
> 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 <https://stackoverflow.com/questions/44332850/mysterious-will-never-be-executed-warning>
>
> R+
> _______________________________________________
> swift-users mailing list
> swift-users at swift.org
> https://lists.swift.org/mailman/listinfo/swift-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-users/attachments/20170602/9ba05982/attachment.html>
More information about the swift-users
mailing list