Index: runtime/lib/double.dart |
diff --git a/runtime/lib/double.dart b/runtime/lib/double.dart |
index f4025f3b745ed90d6c66233c91568357720d57a6..aee84e23bc74334e383864da1cc1359eb2bb1d1f 100644 |
--- a/runtime/lib/double.dart |
+++ b/runtime/lib/double.dart |
@@ -114,7 +114,9 @@ class _Double implements double { |
if (exponent == 0) { |
return 1.0; // ECMA-262 15.8.2.13 |
} |
- // Throw NullPointerException if exponent is null. |
+ if (exponent is! num) { |
+ throw new ArgumentError(null); |
+ } |
double doubleExponent = exponent.toDouble(); |
if (isNaN || exponent.isNaN) { |
return double.NAN; |