Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix edge case for max/min of int vs dbl
Summary:min(x, y) should return x if x==y, but in the jit, if x and y were ints or doubles, it returned y (this is only visible if one is an int and the other is a double). Reviewed By: paulbiss Differential Revision: D3001634 fb-gh-sync-id: ce37d6e58cc12929ce793d76d73e9186f1cd1fec shipit-source-id: ce37d6e58cc12929ce793d76d73e9186f1cd1fec
- Loading branch information
Mark Williams
authored and
Hhvm Bot
committed
Mar 4, 2016
1 parent
de69ac3
commit c1b414e
Showing
3 changed files
with
14 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?php | ||
|
||
function main($a, $b) { | ||
var_dump(min($a, $b), max($a, $b)); | ||
} | ||
|
||
main(1.0, 1); | ||
main(1, 1.0); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
float(1) | ||
float(1) | ||
int(1) | ||
int(1) |