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
parent::__construct
https://psalm.dev/r/5ed8791c72
Directly after parent::__construct we should know the concrete types of properties hinted as interfaces.
The text was updated successfully, but these errors were encountered:
I found these snippets:
<?php interface I { public function getValue(): string; } class C implements I { public string $value; public function __construct(string $value) { $this->value = $value; } public function getValue(): string { return $this->value; } } class X { protected I $iface; public function __construct(I $iface) { $this->iface = $iface; } } class Y extends X { public function __construct() { // $this->iface = new C('test'); parent::__construct(new C('test')); $this->iface->value .= 'test'; } }
Psalm output (using commit dee5fe4): ERROR: NoInterfaceProperties - 36:9 - Interfaces cannot have properties
Sorry, something went wrong.
No branches or pull requests
https://psalm.dev/r/5ed8791c72
Directly after
parent::__construct
we should know the concrete types of properties hinted as interfaces.The text was updated successfully, but these errors were encountered: