-
-
Notifications
You must be signed in to change notification settings - Fork 864
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
Template type bound to array vs array shapes #6568
Labels
Milestone
Comments
arnaud-lb
changed the title
Generics vs array shapes
Template type bound to array vs array shapes
Feb 5, 2022
related to #6588 |
@arnaud-lb After the latest push in 1.10.x, PHPStan now reports different result with your code snippet: @@ @@
+10: Function test() should return T of array but returns array<mixed, mixed>.
17: Dumped type: array{foo: 1} Full report
|
This is fixed, according to the bot. Thank you! |
Yeah, it nicely surprised me 😊 |
ondrejmirtes
added a commit
to phpstan/phpstan-src
that referenced
this issue
Feb 20, 2023
Closes phpstan/phpstan#6568 Closes phpstan/phpstan#7766 Closes phpstan/phpstan#5781 Closes phpstan/phpstan#5986
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
In the following code snippet, it is possible to return an array that is not compatible with the resolved type
Code snippet that reproduces the problem
https://phpstan.org/r/9effa16d-1197-45d0-ae20-3df328f43115
Expected output
The text was updated successfully, but these errors were encountered: