closes #9904
@@ -2171,7 +2171,7 @@ module StdStd = struct
)
let parseFloat = vfun1 (fun v ->
- try vfloat (Numeric.parse_float (decode_string v)) with _ -> vnull
+ try vfloat (Numeric.parse_float (decode_string v)) with _ -> vfloat Float.nan
let random = vfun1 (fun v ->
@@ -0,0 +1,8 @@
+package unit.issues;
+
+class Issue9904 extends unit.Test {
+ function test() {
+ f(Std.parseFloat("a") == null);
+ t(Math.isNaN(Std.parseFloat("a")));
+ }
+}