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

Not useful error message when add private to a undefined constant #12195

Open
zw963 opened this issue Jul 4, 2022 · 0 comments
Open

Not useful error message when add private to a undefined constant #12195

zw963 opened this issue Jul 4, 2022 · 0 comments

Comments

@zw963
Copy link
Contributor

zw963 commented Jul 4, 2022

When there is a undefined private const A_INSTANCE, like this:

private A_INSTANCE

It will raise error like this:

166 | private A_INSTANCE
       ^
Error: can't apply visibility modifier

This error msg is really confusing.

Following msg is more clear:

Error: can't apply visibility modifier to a undefined constant

or, use old error message is okay.

Error: undefined constant A_INSTANCE
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