-
Notifications
You must be signed in to change notification settings - Fork 439
Fix wrong diagnostic for generics #1498
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
49745e2
to
38aacf4
Compare
@swift-ci please test |
38aacf4
to
ea628d7
Compare
I think we should not diagnose this in the parser. A generic parameter list can be represented perfectly well in the SwiftSyntax tree and should thus be diagnosed by later stages of the compilation pipeline. I should have added that comment to the GitHub issue, sorry. We should fix the crash though. |
@ahoppen I'm not sure I understand. I think the reason is, because here the current token is The line after we then consume the token and remap it to So what I try to do, is only consume the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Forget what I said. I was stupid and didn’t read your PR properly, I’m sorry.
I thought you had added code in ParseDiagnosticGenerator
that detected empty generic argument lists but that’s just not what you did. Looking at your PR again, it looks good, I’m just wondering why you can’t use consumePrefix
.
ea628d7
to
e86341c
Compare
e86341c
to
fd3a8c5
Compare
@swift-ci please test |
@swift-ci please test windows |
Fix wrong diagnostic for generics
Fix wrong diagnostic for generics
Fix wrong diagnostic for generics
Fix wrong diagnostic for generics
Fix wrong diagnostic for generics
Fixes #1483
Opened to see if I was on the right path