-
-
Notifications
You must be signed in to change notification settings - Fork 947
Type lost when assigning variable in method argument #12234
Copy link
Copy link
Closed
phpstan/phpstan-src
#4787Labels
Milestone
Description
Bug report
When calling a method/function, and assigning a variable for one of the arguments of that method/function, the type is lost for subsequent method arguments:
foo(
$bar = new A();
// $bar->getInt() is evaluated as mixed here
)Code snippet that reproduces the problem
Expected output
The snippet should not cause any errors
Did PHPStan help you today? Did it make you happy in any way?
No response
Reactions are currently unavailable