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

Polyfill does not properly calculate value of binary int literals #3586

Closed
TysonAndre opened this issue Dec 18, 2019 · 0 comments · Fixed by #3596
Closed

Polyfill does not properly calculate value of binary int literals #3586

TysonAndre opened this issue Dec 18, 2019 · 0 comments · Fixed by #3596
Labels
bug A crash in Phan, a recent change causing incorrect analysis results, etc.

Comments

@TysonAndre
Copy link
Member

TysonAndre commented Dec 18, 2019

With --allow-polyfill-parser or --force-polyfill-parser or fallback

<?php
function test_bit(array $y) {
    $x = $y[0];
    // false positive PhanTypeInvalidBitwiseBinaryOperator Invalid non-int/non-string operand provided to operator '&' between types mixed and 0.0
    if ($x & 0b011111111111111111111111) {
    }
    invalid_token_causes_polyfill
}
@TysonAndre TysonAndre added the bug A crash in Phan, a recent change causing incorrect analysis results, etc. label Dec 18, 2019
TysonAndre added a commit to TysonAndre/phan that referenced this issue Dec 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A crash in Phan, a recent change causing incorrect analysis results, etc.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant