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

Merged
merged 2 commits into from
Nov 18, 2024

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.

@WojciechMazur WojciechMazur merged commit 7644ecd into scala:main Nov 18, 2024
29 checks passed
@WojciechMazur WojciechMazur deleted the fix/21768 branch November 18, 2024 09:34
@WojciechMazur WojciechMazur added the backport:nominated If we agree to backport this PR, replace this tag with "backport:accepted", otherwise delete it. label Nov 18, 2024
WojciechMazur added a commit that referenced this pull request Nov 18, 2024
…w line (#21957)

Fixes #21768 

Fixes usages of `with {...}` and `= new {}` declarations presented in
tests.
[Cherry-picked 7644ecd]
@WojciechMazur WojciechMazur added backport:accepted This PR needs to be backported, once it's been backported replace this tag by "backport:done" and removed backport:nominated If we agree to backport this PR, replace this tag with "backport:accepted", otherwise delete it. labels Nov 18, 2024
WojciechMazur added a commit that referenced this pull request Nov 18, 2024
…ated by new line" to 3.6 (#21964)

Backports #21957 to the 3.6.2.

PR submitted by the release tooling.
[skip ci]
@WojciechMazur WojciechMazur added backport:done This PR was successfully backported. and removed backport:accepted This PR needs to be backported, once it's been backported replace this tag by "backport:done" labels Nov 18, 2024
@WojciechMazur WojciechMazur added this to the 3.6.2 milestone Nov 18, 2024
KacperFKorban pushed a commit to dotty-staging/dotty that referenced this pull request Nov 20, 2024
…w line (scala#21957)

Fixes scala#21768 

Fixes usages of `with {...}` and `= new {}` declarations presented in
tests.
KacperFKorban pushed a commit to dotty-staging/dotty that referenced this pull request Nov 29, 2024
…w line (scala#21957)

Fixes scala#21768 

Fixes usages of `with {...}` and `= new {}` declarations presented in
tests.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:done This PR was successfully backported.
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