-
Notifications
You must be signed in to change notification settings - Fork 547
Detect more possibly-impossible offset #4164
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
Conversation
|
I feel like the error could always be reported on level 7+. The difference is that the |
35af5a4 to
f4b6dbd
Compare
c290ea1 to
2417411
Compare
|
This pull request has been marked as ready for review. |
2417411 to
0a8a1e2
Compare
0a8a1e2 to
accabee
Compare
ondrejmirtes
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm still not so sure about this, the impact seems high...
| "ignorable": true | ||
| }, | ||
| { | ||
| "message": "Offset int|object might not exist on array{baz: 21}|array{foo: 17, bar: 19}.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks wrong for array{foo: 17, bar: 19}|array{baz: 21}. int|object never exists on these arrays.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed, I think this is because of #4272 which need to be fix/merged first then.
accabee to
0536ac1
Compare
|
Since they are kinda related, #4166 might be better to merge first (?) |
fb1c818 to
ccea22a
Compare
|
Thank you. |
Closes phpstan/phpstan#1061