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
Empty string and generics union type parameter issue #7562
Comments
koriym
added a commit
to koriym/Ray.Di
that referenced
this issue
Jul 2, 2022
koriym
added a commit
to koriym/Ray.Di
that referenced
this issue
Jul 2, 2022
@koriym After the latest push in 1.8.x, PHPStan now reports different result with your code snippet: @@ @@
-19: Parameter #1 $p of function ng expects class-string<>, string given.
+No errors |
regression test incoming |
clxmstaab
added a commit
to staabm/phpstan-src
that referenced
this issue
Sep 19, 2022
clxmstaab
added a commit
to staabm/phpstan-src
that referenced
this issue
Sep 19, 2022
ondrejmirtes
pushed a commit
to phpstan/phpstan-src
that referenced
this issue
Sep 19, 2022
ondrejmirtes
added a commit
that referenced
this issue
Sep 19, 2022
phpstan/phpstan-src@9ec53eb added regression test for #7562 phpstan/phpstan-src@de67394 Optimize ConstantArrayType::isKeysSupersetOf() phpstan/phpstan-src@bd57fc5 Remove outdated comments
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. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Bug report
Empty string and generics union type parameter does not accept an empty string.
''|class-string
union type parameter accepts empty-string, but not with''|class-string<T>
parameter.Code snippet that reproduces the problem
Parameter #1 $p of function ng expects class-string<>, string given.
https://phpstan.org/r/c4e8c2a7-59a6-4863-94e4-48b0a02b7af3
Expected output
No error.
Did PHPStan help you today? Did it make you happy in any way?
It always helps. Arigato!
The text was updated successfully, but these errors were encountered: