- Swift version 4.0 (swiftlang-900.0.43 clang-900.0.22.8)
- Swift version 4.0 (swiftlang-900.0.63.10 clang-900.0.36)
- Swift version 4.0.2 (swiftlang-900.0.69.1 clang-900.0.38)
- Swift version 4.0.3 (swiftlang-900.0.74.1 clang-900.0.39.2)
- Swift version 4.1 (swiftlang-902.0.34 clang-902.0.30)
I'm filing a particular example, but this is just one of the hundreds I've ran into regarding this since Swift 1.0. I honestly don't think this has gotten any better since the very first version.
This is a reduction from my own codebase. As I was going through the Swift 4.0 migrations, lots of places relying on tuple deconstruction in closure parameters stopped working, and diagnostics leave A LOT to be desired (https://twitter.com/NachoSoto/status/874336197568454656, https://twitter.com/NachoSoto/status/874336844757975040).
This was compiling in Swift 3.x. Notice the `isRepeat` parameter I'm passing only has one _.
Say what? What's the problem in d? That looks correct to me...
Spoiler alert, the correct fix is changing isRepeat to
Instead of just _.
Again, like I said in the title, this is not an isolated bug, this happens ALL THE TIME when types can't be inferred. Diagnostic always point to the wrong thing with a useless message.
When are you going to start focusing on diagnostics? I have filed SO MANY diagnostic bugs that are still open: