-
Notifications
You must be signed in to change notification settings - Fork 442
Fix parsing invalid function parameters #2927
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
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) } |
a5831b5
to
dfbc52e
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, Kim. This looks good to me.
The macOS formatting failure is unrelated. We’re currently working on a fix, should be fixed tomorrow-ish, could you re-trigger CI then? |
Yes no problem. Will rebase and re-trigger. |
For reference, this is the PR that fixes the format issue: swiftlang/swift#79380 |
@swift-ci please test |
Fixes #2254