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