[SR-4395] Incomplete initialization of self results in confusing error messages with @autoclosure functions #46974
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
compiler
The Swift compiler in itself
diagnostics QoI
Bug: Diagnostics Quality of Implementation
Environment
Swift 3.1
Additional Detail from JIRA
md5: 5915746317b41ebad398b7259dc02d0b
duplicates:
Issue Description:
The following code compiles fine
But if one decides that the if condition needs to do more:
This error confusing for a few reasons: there's no closures in the source (just the @autoclosure second argument of &&), and the reverse works fine (self.a > 0 && true).
(Prompted by http://stackoverflow.com/questions/43074430/guard-condition-provokes-compiler-error-that-talks-about-closure )
The text was updated successfully, but these errors were encountered: