-
-
Notifications
You must be signed in to change notification settings - Fork 927
Closed
phpstan/phpstan-src
#3097Labels
Milestone
Description
Bug report
I have class A which I can change, and class B which I don't have control over.
The output is this:
------ -----------------------------------------------
Line phpstan.php
------ -----------------------------------------------
10 Dumped type: string
12 Dumped type: mixed
14 Access to an undefined property object::$foo.
------ -----------------------------------------------
I don't understand 2 things:
- Why the type of
$this->foo
is changed tomixed
- Why then
$this->foo
is suddenly undefined?
Code snippet that reproduces the problem
https://phpstan.org/r/40d3135d-7d52-4ebe-bb1c-7f23b4ecb4f4
Expected output
------ -----------------------------------------------
Line phpstan.php
------ -----------------------------------------------
10 Dumped type: string
12 Dumped type: string
------ -----------------------------------------------
Did PHPStan help you today? Did it make you happy in any way?
Still love the tool!!