Skip to content

Conversation

@benkobalog
Copy link
Contributor

No description provided.

@benkobalog benkobalog changed the title Fix #4400 Allow keyword start after numbers Fix #4500 Allow keyword start after numbers May 10, 2018
@allanrenucci
Copy link
Contributor

Wrong issue number in commit message

@benkobalog
Copy link
Contributor Author

I fixed it @allanrenucci

if (n.isUpper && (keywordStart || prev == '.')) {
appendWhile(n, !typeEnders.contains(_), typeDef)
} else if (keywordStart) {
} else if (keywordStart || prev.isDigit) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't you fix keywordStart instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I was thinking about it too and maybe I should have asked first.
The other place where keywordStart is used is type ascriptions (the if just before the one I modified). And as far as I know there is no situation where a number literal can precede a type ascription. For this reason I only added it here.
But maybe it would be better to add it to keywordStart.

Copy link
Contributor

@allanrenucci allanrenucci left a comment

Choose a reason for hiding this comment

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

Sorry @benkobalog. I forgot about this PR.

I think the fix has to go in keywordStart. I rebased the PR and appended a commit

@allanrenucci allanrenucci merged commit 1d24eaa into scala:master Aug 28, 2018
@benkobalog benkobalog deleted the fix-#4500 branch August 29, 2018 07:46
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