Skip to content

Parser error for type arguments with trailing comma #15394

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

Closed
albertpchen opened this issue Jun 8, 2022 · 0 comments · Fixed by #15395
Closed

Parser error for type arguments with trailing comma #15394

albertpchen opened this issue Jun 8, 2022 · 0 comments · Fixed by #15395

Comments

@albertpchen
Copy link
Contributor

Compiler version

3.2.0-RC1-bin-20220602-42b5941-NIGHTLY

Minimized code

def bar[T] = ()

val foo = bar[
  Int,
]

Output

-- [E040] Syntax Error: scratch.scala:5:0 --------------------------------------
5 |]
  |^
  |an identifier expected, but ']' found

Expectation

It should parse and compile with no errors. The same code compiles fine with 3.1.2.

@albertpchen albertpchen added itype:bug stat:needs triage Every issue needs to have an "area" and "itype" label labels Jun 8, 2022
@anatoliykmetyuk anatoliykmetyuk added area:parser and removed stat:needs triage Every issue needs to have an "area" and "itype" label labels Jun 10, 2022
@Kordyjan Kordyjan added this to the 3.2.0 milestone Aug 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants