-
-
Notifications
You must be signed in to change notification settings - Fork 930
Closed
Labels
Milestone
Description
Bug report
The return type of generic first-class closures doesn't seem to resolve correctly.
Wrapping them in an arrow function or anonymous function seems to bypass the problem.
The type of closure (method, static method or function) doesn't seem to make a difference.
(discovered in #11055 (comment))
Code snippet that reproduces the problem
https://phpstan.org/r/3ac8de30-a9c4-4c59-b5eb-fe58291e30f5
Expected output
In the given example, no errors/warnings were expected to be reported in PHP 8.3.
Did PHPStan help you today? Did it make you happy in any way?
Yeah, managed to catch a couple of bugs that even testing didn't catch. 💪