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

🐛 Failed to parse const modifier. #1624

Closed
1 task done
uzmoi opened this issue Jan 21, 2024 · 0 comments · Fixed by #1625
Closed
1 task done

🐛 Failed to parse const modifier. #1624

uzmoi opened this issue Jan 21, 2024 · 0 comments · Fixed by #1625
Labels
A-Parser Area: parser S-Bug-confirmed Status: report has been confirmed as a valid bug S-Help-wanted Status: you're familiar with the code base and want to help the project

Comments

@uzmoi
Copy link

uzmoi commented Jan 21, 2024

Environment information

CLI:
  Version:                      1.5.1
  Color support:                true

Platform:
  CPU Architecture:             x86_64
  OS:                           linux

Environment:
  BIOME_LOG_DIR:                unset
  NO_COLOR:                     unset
  TERM:                         "xterm-256color"
  JS_RUNTIME_VERSION:           "v20.10.0"
  JS_RUNTIME_NAME:              "node"
  NODE_PACKAGE_MANAGER:         "npm/10.2.5"

Biome Configuration:
  Status:                       Loaded successfully
  Formatter disabled:           false
  Linter disabled:              false
  Organize imports disabled:    false
  VCS disabled:                 false

Workspace:
  Open Documents:               0

What happened?

If the type parameter of a function in method notation has a const modifier, parsing will fail with the error 'const' modifier can only appear on a type parameter of a function, method or class..

https://biomejs.dev/playground/?code=dAB5AHAAZQAgAEYAbwBvACAAPQAgAHsACgAgACAAPABjAG8AbgBzAHQAIABUAD4AKAApADsACgAgACAAbQBlAHQAaABvAGQAPABjAG8AbgBzAHQAIABUAD4AKAApADsACgB9ADsA

Expected result

Successful parsing.

Code of Conduct

  • I agree to follow Biome's Code of Conduct
@ematipico ematipico added S-Help-wanted Status: you're familiar with the code base and want to help the project A-Parser Area: parser S-Bug-confirmed Status: report has been confirmed as a valid bug labels Jan 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Parser Area: parser S-Bug-confirmed Status: report has been confirmed as a valid bug S-Help-wanted Status: you're familiar with the code base and want to help the project
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants