[SR-2661] Usability regression re: fatalError() within function literals #45266
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
compiler
The Swift compiler in itself
regression
swift 3.0
type checker
Area → compiler: Semantic analysis
Environment
Swift 3.0
Additional Detail from JIRA
md5: d96afbd5d3223a6d24b62985a71c1cb6
Issue Description:
The transition to using the 'Never' type as the underlying mechanism for no-return functions such as fatalError() has caused a serious usability regression preventing their use within function literals, where it was possible before.
Consider the following cases:
I filed a bug report with Apple which was closed as 'intended behaviour' but I am unsatisfied by this answer. The third case in particular highlights this as a complex inconsistency that should be considered for a potential fix, or at least deserves a detailed explanation.
The text was updated successfully, but these errors were encountered: