[SR-5735] unable to infer closure type but able to provide Fix-It #48305
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
compiler
The Swift compiler in itself
regression
swift 4.0
type checker
Area → compiler: Semantic analysis
Attachment: Download
Environment
Xcode Version 9.0 beta 6 (9M214v)
Additional Detail from JIRA
md5: 4b26827cc50cd2854440c53e30a6638a
Issue Description:
As shown in the attached screen shot, I'm being told that we can't infer the type of a closure return type, but I'm also being given a Fix-It suggestion that inserts that type correctly.
Maybe I'm just being dense here, but if Fix-it can correctly tell me and insert the return type, doesn't that mean we can infer its type? If Fix-It can do this, why can't the compiler do it?
[Should have mentioned that this compiled fine in Xcode 8.1 and even Xcode 9 beta 3. So part of the bug report is that this used to compile, quite recently.]
Test code:
The text was updated successfully, but these errors were encountered: