-
Notifications
You must be signed in to change notification settings - Fork 650
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
Flag accessing static properties with ->
#6117
Labels
Comments
I found these snippets: https://psalm.dev/r/8df7ccd811<?php
class A {
private static int $b = 1;
public function method(): int {
return $this->b;
}
}
|
The opposite should also be checked: https://psalm.dev/r/d79f2332b6 |
I found these snippets: https://psalm.dev/r/d79f2332b6<?php
class A {
private int $b = 1;
public static function method(): int {
return self::$b;
}
}
|
weirdan
added a commit
to weirdan/psalm
that referenced
this issue
Jul 17, 2021
This handles two new cases: 1. Accessing static property with `->` (produces notices and warnings: https://3v4l.org/TiGan) 2. Accessing non-static property with `::` (causes fatal error: https://3v4l.org/IdYSh) Fixes vimeo#6117
weirdan
added a commit
to weirdan/psalm
that referenced
this issue
Jul 17, 2021
This handles two new cases: 1. Accessing static property with `->` (produces notices and warnings: https://3v4l.org/TiGan) 2. Accessing non-static property with `::` (causes fatal error: https://3v4l.org/IdYSh) Fixes vimeo#6117
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://psalm.dev/r/8df7ccd811
https://3v4l.org/iRj67
Expected:
UndefinedProperty
The text was updated successfully, but these errors were encountered: