Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(306)

Unified Diff: pkg/compiler/lib/src/constants/constant_constructors.dart

Issue 2102553002: Handle double literals in constant constructors. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tests/compiler/dart2js/serialization/test_data.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/constants/constant_constructors.dart
diff --git a/pkg/compiler/lib/src/constants/constant_constructors.dart b/pkg/compiler/lib/src/constants/constant_constructors.dart
index c389eefef3426ac639fc17bf2590b34ffdc32db9..874dab7c4f7a0584fbed397a22edd000a573b105 100644
--- a/pkg/compiler/lib/src/constants/constant_constructors.dart
+++ b/pkg/compiler/lib/src/constants/constant_constructors.dart
@@ -285,6 +285,11 @@ class ConstantConstructorComputer extends SemanticVisitor
}
@override
+ ConstantExpression visitLiteralDouble(LiteralDouble node) {
+ return new DoubleConstantExpression(node.value);
+ }
+
+ @override
ConstantExpression visitLiteralBool(LiteralBool node) {
return new BoolConstantExpression(node.value);
}
« no previous file with comments | « no previous file | tests/compiler/dart2js/serialization/test_data.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698