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

Handle old given syntax where identifier and type are seperated by new line #21957

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

WojciechMazur
Copy link
Contributor

Fixes #21768

Fixes usages of with {...} and = new {} declarations presented in tests.

Copy link
Contributor

@odersky odersky left a comment

Choose a reason for hiding this comment

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

Otherwise LGTM

@@ -1010,13 +1010,25 @@ object Parsers {
skipParams()
lookahead.isColon
&& {
lookahead.nextToken()
Copy link
Contributor

Choose a reason for hiding this comment

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

I would move the lookahead.nextToken() to line 1018, just before
!lookahead.isAfterLineEnd. That saves us a useless nextToken when source is 3.6.

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.

New givens syntax does no logger accepts valid given defintions
2 participants