-
-
Notifications
You must be signed in to change notification settings - Fork 946
Closed
Description
Bug report
After update to 2.1.34, argument.type error started popping up in unexpected situations. See reproduction on phpstan.org/try. The issue seems to be calling a method on $this inside callable passed as parameter.
If a method on $this isn’t inside the callable or the callable is passed after the then-checked-nullable, it works.
Code snippet that reproduces the problem
https://phpstan.org/r/939edeab-1035-4618-80d8-56ce95614038
Expected output
All three cases should not throw an exception.
Did PHPStan help you today? Did it make you happy in any way?
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels