Skip to content
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

Avoid lookup up match for non-Token.Left{Brace,Paren} #1213

Merged
merged 1 commit into from
Jun 5, 2018

Conversation

olafurpg
Copy link
Member

@olafurpg olafurpg commented Jun 5, 2018

Fixes #1203

cc/ @fommil

@olafurpg olafurpg requested a review from pjrt June 5, 2018 19:42
case Modifier() =>
// This case only applies to classes
next(f).right match {
case x @ (_: Token.LeftParen | _: Token.LeftBracket) =>
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fix is ugly but it seems to do the job, feel free to refactor @pjrt I'm not sure exactly what this case is about

Copy link
Collaborator

@pjrt pjrt Jun 5, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unn, I haven't looked at this code in a while. But it doesn't look any more ugly than the other stuff we need to do in this file :).

@olafurpg olafurpg mentioned this pull request Jun 5, 2018
@olafurpg olafurpg merged commit 7dd4b00 into scalameta:master Jun 5, 2018
@olafurpg olafurpg deleted the 1203 branch June 5, 2018 20:18
@olafurpg olafurpg added this to the v1.6.0-RC2 milestone Jun 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants