We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
It might be an edge case, but the following snippet incorrectly yields an error:
https://psalm.dev/r/4f6b90fe88
Accessing the populated property in the constructor is perfectly valid:
https://3v4l.org/AIDLL
The text was updated successfully, but these errors were encountered:
I found these snippets:
<?php class Foo {} class Bar { public function __construct(Foo $foo) {} } class Baz { private Bar $bar; public function __construct(private Foo $foo, ?Bar $bar = null) { $this->bar = $bar ?? new Bar($this->foo); } } new Baz(new Foo());
Psalm output (using commit 95de6cf): ERROR: UninitializedProperty - 15:38 - Cannot use uninitialized property $this->foo ERROR: PossiblyNullArgument - 15:38 - Argument 1 of Bar::__construct cannot be null, possibly null value provided
Sorry, something went wrong.
1fc1cae
Fix vimeo#4615 - ensure promoted properties are not treated as uninit…
dc9a2a4
…ialized
No branches or pull requests
It might be an edge case, but the following snippet incorrectly yields an error:
https://psalm.dev/r/4f6b90fe88
Accessing the populated property in the constructor is perfectly valid:
https://3v4l.org/AIDLL
The text was updated successfully, but these errors were encountered: