Index: sdk/lib/_internal/compiler/implementation/js_backend/constant_system_javascript.dart |
diff --git a/sdk/lib/_internal/compiler/implementation/js_backend/constant_system_javascript.dart b/sdk/lib/_internal/compiler/implementation/js_backend/constant_system_javascript.dart |
index b36c71cf2721393860254555d2f6017de279d763..917afcc4ae34f3839e53c2ad814f2ae64be30205 100644 |
--- a/sdk/lib/_internal/compiler/implementation/js_backend/constant_system_javascript.dart |
+++ b/sdk/lib/_internal/compiler/implementation/js_backend/constant_system_javascript.dart |
@@ -200,7 +200,7 @@ class JavaScriptConstantSystem implements ConstantSystem { |
double doubleValue = doubleResult.value; |
if (!doubleValue.isInfinite && !doubleValue.isNaN && |
!constant.isMinusZero()) { |
- int intValue = doubleValue.toInt(); |
+ int intValue = doubleValue.truncate(); |
if (intValue == doubleValue && integerFitsIntoDouble(intValue)) { |
return new IntConstant(intValue); |
} |