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

Unified Diff: pkg/compiler/lib/src/inferrer/type_graph_inferrer.dart

Issue 1371193004: Add bool value types to type inference. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 3 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
Index: pkg/compiler/lib/src/inferrer/type_graph_inferrer.dart
diff --git a/pkg/compiler/lib/src/inferrer/type_graph_inferrer.dart b/pkg/compiler/lib/src/inferrer/type_graph_inferrer.dart
index efaae28d3b728f86ccb1c037e2e8c4a3bc2b79e6..1bcb5d59d18fb3cfc98893d06948d7678a756dc9 100644
--- a/pkg/compiler/lib/src/inferrer/type_graph_inferrer.dart
+++ b/pkg/compiler/lib/src/inferrer/type_graph_inferrer.dart
@@ -35,6 +35,7 @@ import '../resolution/tree_elements.dart' show
import '../tree/tree.dart' as ast show
DartString,
Node,
+ LiteralBool,
Send,
SendSet,
TryStatement;
@@ -242,6 +243,10 @@ class TypeInformationSystem extends TypeSystem<TypeInformation> {
value, compiler.typesTask.stringType);
}
+ TypeInformation boolLiteralType(ast.LiteralBool value) {
+ return new BoolLiteralTypeInformation(value, compiler.typesTask.boolType);
+ }
+
TypeInformation computeLUB(TypeInformation firstType,
TypeInformation secondType) {
if (firstType == null) return secondType;

Powered by Google App Engine
This is Rietveld 408576698