-
Notifications
You must be signed in to change notification settings - Fork 422
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
Fix parsing invalid function parameters #2927
base: main
Are you sure you want to change the base?
Conversation
f538bf6
to
49cbb92
Compare
49cbb92
to
a5831b5
Compare
@swift-ci please test |
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.
Thanks. Looks good to me. I think just a few tests need to be updated.
Not sure what is right. It will change I think this is more wrong. Would it make sense to assume that if it starts with a lower case, it's an identifier and if it starts with an uppercase it's a type? |
I think that’s very reasonable behavior for error recovery. I have wanted to do this in some case in the past but I think that change never made to to a PR. |
I was digging a bit into it. |
I would try shoving the uppercase check into the line that currently has. let canParseType = withLookahead { $0.canParseType() && $0.at(.comma, .rightParen) } |
Fixes #2254