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

Does not detect implicit int -> float conversion when null is allowed #1711

Closed
jankonas opened this issue Dec 13, 2018 · 3 comments
Closed
Labels
Milestone

Comments

@jankonas
Copy link

Summary of a problem or a feature request

Code speaks for 1000 words ⬇️ 😉

Array content detection reports that int is present in the array and float|null is expected when the called function requests ?float parameter. The detection behaves correctly when only float parameter is requested.

Code snippet that reproduces the problem

https://phpstan.org/r/1e51242a-89bd-481a-b6a1-3c0cc173b7d5

Expected output

Linked code snippet should not report any issues.

@ondrejmirtes ondrejmirtes added this to the Easy fixes milestone Dec 18, 2018
@jankonas
Copy link
Author

jankonas commented Jan 7, 2021

@jankonas jankonas closed this as completed Jan 7, 2021
@ondrejmirtes
Copy link
Member

Needs a regression test.

@github-actions
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 Apr 29, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants