Skip to content
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

Bleeding edge generalizes generic type too aggressively since 1.10.48 #10473

Closed
vojtech-dobes opened this issue Jan 23, 2024 · 3 comments
Closed

Comments

@vojtech-dobes
Copy link

Bug report

When bleeding edge is enabled, since 1.10.48 we've noticed that generic types that were previously correctly remembered now appear "one level simplified" and thus imprecise, leading to mismatches with expectations of rest of the codebase.

Code snippet that reproduces the problem

https://phpstan.org/r/08da8393-113a-4377-930e-f4bd6b442445

Expected output

In the playground, even with bleeding edge on, lines 93, 96 & 97 all should report int<0, max> instead of just int (more precise type is still remembered on line 88).

Did PHPStan help you today? Did it make you happy in any way?

It makes our whole team at ContentKing happy every day, helps the speed of development tremendously!

@ondrejmirtes
Copy link
Member

Fixed: phpstan/phpstan-src@11268e5

@vojtech-dobes
Copy link
Author

Awesome! Thank you very much.

Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants