You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
An int returned from a ?float function, or stored in a ?float property, stays int instead of converting to float. #553
An int returned from a ?float function, or stored in a ?float property, stays int instead of converting to float.
Repro
<?phpfunctionpn(int$a): ?float { return$a; }
class N { public ?float$n = null; }
$o = newN; $o->n = 5;
var_dump(pn(5), $o->n);
Expected (php)
float(5)
float(5)
Actual (manticore 3b1410b7, Darwin arm64)
int(5)
int(5)
Tracking
Known-bug repro: tests/aot/repro/wrong/int_into_nullable_float_stays_int.php — bash tests/aot/xfail.sh -k int_into_nullable_float_stays_int reports XFAIL while this is open and XPASS once it is fixed; then move the repro into tests/aot/cases/ and close this issue.
Activity