| Index: sdk/lib/_internal/compiler/implementation/types/inferrer_visitor.dart
|
| ===================================================================
|
| --- sdk/lib/_internal/compiler/implementation/types/inferrer_visitor.dart (revision 27024)
|
| +++ sdk/lib/_internal/compiler/implementation/types/inferrer_visitor.dart (working copy)
|
| @@ -611,7 +611,13 @@
|
| }
|
|
|
| T visitLiteralDouble(LiteralDouble node) {
|
| - return types.doubleType;
|
| + ConstantSystem constantSystem = compiler.backend.constantSystem;
|
| + Constant constant = constantSystem.createDouble(node.value);
|
| + // The JavaScript backend may turn this literal into an integer at
|
| + // runtime.
|
| + return constantSystem.isDouble(constant)
|
| + ? types.doubleType
|
| + : types.intType;
|
| }
|
|
|
| T visitLiteralInt(LiteralInt node) {
|
|
|