Skip to content

Commit c2c3a48

Browse files
authored
Merge pull request scala-js#3662 from sjrd/fix-gcc-compliant-as-jl-number-undefined
[no-master] Fix scala-js#3660: Use `$asDouble` in `compareTo` for `number`s.
2 parents 00a37f5 + 08ecafa commit c2c3a48

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/scalajsenv.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,7 @@ ScalaJS.comparableCompareTo = function(instance, rhs) {
384384
return instance === rhs ? 0 : (instance < rhs ? -1 : 1);
385385
case "number":
386386
//!if asInstanceOfs != Unchecked
387-
ScalaJS.as.jl_Number(rhs);
387+
ScalaJS.asDouble(rhs);
388388
//!endif
389389
return ScalaJS.m.jl_Double$().compare__D__D__I(instance, rhs);
390390
case "boolean":

0 commit comments

Comments
 (0)