New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Some strange NEVER compatibility issue #4006
Comments
Hi, I fixed the error message: phpstan/phpstan-src@38fe693 Otherwise the reported error seems legit. |
Hmm, I don't get why it's legit. I thought that PHPDoc types are inherited and it's a bug. Why it isn't possible to declare a native return type besides |
https://phpstan.org/r/0e134edb-d7fe-4d69-a459-c9ae46423018 |
You're hitting the edges of the type system where things are weird :) Usually you'd get this message:
But because it's For |
I could probably make never + void result in never... |
Fixed: phpstan/phpstan-src@1857c6c |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
https://phpstan.org/r/cbdc5e54-29b0-486f-9f5b-cac0e4366768
Removing the native
void
return type fixes the issue.The text was updated successfully, but these errors were encountered: