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

Infix modifier is not covered by the EBNF #19668

Closed
susliko opened this issue Feb 11, 2024 · 0 comments · Fixed by #19670
Closed

Infix modifier is not covered by the EBNF #19668

susliko opened this issue Feb 11, 2024 · 0 comments · Fixed by #19670
Labels
itype:bug stat:needs triage Every issue needs to have an "area" and "itype" label
Milestone

Comments

@susliko
Copy link

susliko commented Feb 11, 2024

The following code is valid in Scala 3.3.1

object Test:
  infix def hello = 2001

But it seems to be not covered by the ebnf grammar, as "infix" is only mentioned as a soft keyword.
Probably, it should be among others in the LocalModifier

LocalModifier     ::=  ‘abstract’
                    |  ‘final’
                    |  ‘sealed’
                    |  ‘open’
                    |  ‘implicit’
                    |  ‘lazy’
                    |  ‘inline’
@susliko susliko added itype:bug stat:needs triage Every issue needs to have an "area" and "itype" label labels Feb 11, 2024
odersky added a commit to dotty-staging/dotty that referenced this issue Feb 11, 2024
 1. Add missing soft modifiers
 2. Port changes from multiple type parameter sections to reference.
    Now that multiple type parameter sections are merged, this is the
    official syntax. This also covers extension method declarations.

Fixes scala#19667
Fixes scala#19668
odersky added a commit that referenced this issue Feb 14, 2024
 1. Add missing soft modifiers
2. Port changes from multiple type parameter sections to reference. Now
that multiple type parameter sections are merged, this is the official
syntax. This also covers extension method declarations.

Fixes #19667
Fixes #19668
@Kordyjan Kordyjan added this to the 3.4.2 milestone Mar 28, 2024
@Kordyjan Kordyjan modified the milestones: 3.4.2, 3.5.0 May 10, 2024
WojciechMazur pushed a commit that referenced this issue Jul 1, 2024
 1. Add missing soft modifiers
 2. Port changes from multiple type parameter sections to reference.
    Now that multiple type parameter sections are merged, this is the
    official syntax. This also covers extension method declarations.

Fixes #19667
Fixes #19668

[Cherry-picked e06b831]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
itype:bug stat:needs triage Every issue needs to have an "area" and "itype" label
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants