You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think the native return type hint shouldn't be overridden by throwing (which I guess resolves it to never), and therefore the snippet above shouldn't report any error. If you think otherwise, could you please explain the philosophy behind that? I've experienced this new behaviour when updating from 67 to 69.
The text was updated successfully, but these errors were encountered:
Bug report
I have function with generic callable argument - using generics I describe that the function returns whatever the callback returns.
The problem is when I:
Code snippet that reproduces the problem
https://phpstan.org/r/d0bf24b0-f404-43f0-b000-1c409ae19aa1#
Expected output
I think the native return type hint shouldn't be overridden by throwing (which I guess resolves it to never), and therefore the snippet above shouldn't report any error. If you think otherwise, could you please explain the philosophy behind that? I've experienced this new behaviour when updating from 67 to 69.
The text was updated successfully, but these errors were encountered: