Skip to content

%%private without body should not be allowed #5632

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
cknitt opened this issue Sep 1, 2022 · 0 comments · Fixed by #6175
Closed

%%private without body should not be allowed #5632

cknitt opened this issue Sep 1, 2022 · 0 comments · Fixed by #6175

Comments

@cknitt
Copy link
Member

cknitt commented Sep 1, 2022

Just saw something like this in a codebase:

%%private
let x = 42

This usage of %%private is allowed by the parser/compiler, but has no effect at all.

What the author actually meant was

%%private(let x = 42)

Therefore, the usage without a "body" should cause a compiler error IMHO.

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

Successfully merging a pull request may close this issue.

1 participant