-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Remove The Last Vestiges of isInvalid
from Parse Harder This Time
#27862
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…ration for that being a semantic accessor.
Diagnose the fact that we're missing a colon, not the fact that we're missing a type since that's actually what has gone wrong.
@swift-ci please smoke test |
And because I ain't about to make the same mistake twice @swift-ci please test source compatibility |
OK, this fixes a crasher now. Will rebase once source compatibility gets back to me. |
Release compatibility failure isn't mine. |
@swift-ci please smoke test and merge |
@swift-ci please smoke test |
Use the isInvalid() bit on the TypeRepr to signal that a closure parameter is potentially a tuple destructure. This has two benefits 1) Parse is no longer using the isInvalid() bit on Decl 2) Invalidating the type repr itself means that we no longer spuriously diagnose variable patterns in destructures as missing types.
Even if we weren't invalidating the parameter's type, this would be completing a type's members on a parameter label.
fe8ff4b
to
a772d76
Compare
@swift-ci please smoke test |
'Long as we're waiting on the bots to change @swift-ci please test source compatibility |
@swift-ci please smoke test macOS platform |
1 similar comment
@swift-ci please smoke test macOS platform |
⛵️ |
When SE-110 was being implemented, we accidentally began to accept closure parameter declarations that had no associated parameter names, e.g. foo { ([Int]) in /**/ } This syntax has never been sanctioned by any version of Swift and should be banned. However, the change was made long enough ago and there are enough clients relying on this, that we cannot accept the source break at the moment. For now, add a bit to ParamDecl that marks a parameter as destructured, and back out setting the invalid bit on the type repr for these kinds of declarations. To prevent further spread of this syntax, stub in a warning that offers to insert an anonymous parameter. Resolves part of rdar://56673657 and improves QoI for errors like rdar://56911630
Another go at #27820