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

Unexpected result when using array key value annotation #1974

Closed
torranced opened this issue Jul 29, 2019 · 3 comments
Closed

Unexpected result when using array key value annotation #1974

torranced opened this issue Jul 29, 2019 · 3 comments
Labels

Comments

@torranced
Copy link

Not getting expected error when trying to use the syntax borrowed from Java as described in documentation.

See code here:
https://psalm.dev/r/67151262d6

I'd expect an error when setting the default value of the property.

@muglug muglug closed this as completed in f718c2f Jul 30, 2019
@muglug muglug added the bug label Jul 30, 2019
@muglug
Copy link
Collaborator

muglug commented Jul 30, 2019

Constant docblocks are currently ignored by Psalm, but I fixed the issue for static properties.

@torranced
Copy link
Author

@muglug - Thank you!

I'm presuming there is a reason why constant docblocks are ignored. Is there any one particular issue you could point me to for more info on why that is so?

@muglug
Copy link
Collaborator

muglug commented Jul 30, 2019

I'm presuming there is a reason why constant docblocks are ignored. Is there any one particular issue you could point me to for more info on why that is so?

In 99% of situations Psalm can infer them. For the rest, there's an open issue about this: #942

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

No branches or pull requests

2 participants