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

Align the spec (and write it) and the checks for @targetName #22372

Open
hamzaremmal opened this issue Jan 15, 2025 · 0 comments
Open

Align the spec (and write it) and the checks for @targetName #22372

hamzaremmal opened this issue Jan 15, 2025 · 0 comments
Assignees

Comments

@hamzaremmal
Copy link
Member

Compiler version

312c89a

Minimized example

@annotation.targetName("foo" + "bar") def foo = ???

Output

-- Error: ----------------------------------------------------------------------
1 |@annotation.targetName("foo" + "bar") def foo = ???
  |                       ^^^^^^^^^^^^^
  |                       @targetName needs a string literal as argument
1 error found

Expectation

Should compile. The spec says (should say actually) that the parameter of an @targetName annotation should be a constant expression.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants