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
Undefined property
https://psalm.dev/r/18ed9c0bd0
Line 22 will fail at runtime with Undefined property id
Undefined property id
The text was updated successfully, but these errors were encountered:
I found these snippets:
<?php class Model {} abstract class Foo { /** @var int */ public $id; /** @psalm-return int */ abstract public function create(); } class Bar extends Foo { /** @var Model */ private $model; public function __construct() { $this->model = new Model(); $this->id = $this->model->id; } public function create() { return 1; } }
Psalm output (using commit 9b86021): No issues!
Sorry, something went wrong.
Seems to only be if a property with the same name as defined in Foo is being accessed on $this->model
Foo
$this->model
f72b609
Oof, this is a very good catch, thanks
Fix vimeo#3642 - detect missing property when name matches
a04c0fb
No branches or pull requests
https://psalm.dev/r/18ed9c0bd0
Line 22 will fail at runtime with
Undefined property id
The text was updated successfully, but these errors were encountered: