-
-
Notifications
You must be signed in to change notification settings - Fork 947
@phpstan-assert isn't working with Union #11441
Copy link
Copy link
Closed
phpstan/phpstan-src
#4900Labels
Milestone
Description
Bug report
When doing some check by calling a method using @phpstan-assert tag on union type, the tags is not working as expected.
Code snippet that reproduces the problem
https://phpstan.org/r/884685bf-302a-4be6-a544-94035843b448
Expected output
The expected type of $fooOrBar->getParam() is int|string instead of int|string|null
Did PHPStan help you today? Did it make you happy in any way?
No response
Reactions are currently unavailable