-
Notifications
You must be signed in to change notification settings - Fork 668
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
Is [ 0 => 0, 1 => 1 ] a valid list
?
#3925
Comments
I found these snippets: https://psalm.dev/r/73fe3f58d1<?php
/** @param list $list */
function takesList(array $list): void {}
takesList([ 0 => 0, 1 => 1 ]);
|
Nah, leave out the keys and this passes – I don't consider this a bug |
@muglug Well, yeah, it is obvious that it would pass if you leave out the keys. You have unit tests for this after all. I did not mention this is a bug report, by the way. This issue is more like of question type - I've just asked whether A possible outcome is that it is actually a Another outcome is that |
BTW, the reason I have asked this issue-question is because earlier I was explaining here doctrine/collections#242 (comment) the concept of |
https://psalm.dev/r/73fe3f58d1
The text was updated successfully, but these errors were encountered: