[swift-evolution] [Review] SE-0102: Remove @noreturn attribute and introduce an empty NoReturn type

Anton Zhilin antonyzhilin at gmail.com
Tue Jun 21 15:06:47 CDT 2016


Although quite an obvious thing, I think import and export rules should be 
written in the proposal.

Function with `noreturn` attribute returning type T will be imported to 
Swift as a function returning empty type.

Function returning empty type will be exported from Swift as a `noreturn` 
function returning `void`.

Also, throwing and rethrowing functions returning NoReturn CAN actually 
return if they throw. It is equivalent to returning Either<NoReturn, 
ErrorType>.



More information about the swift-evolution mailing list