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

Unified Diff: pkg/compiler/lib/src/inferrer/inferrer_visitor.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/inferrer_visitor.dart
diff --git a/pkg/compiler/lib/src/inferrer/inferrer_visitor.dart b/pkg/compiler/lib/src/inferrer/inferrer_visitor.dart
index 08fa94517b41c3e90569a3ab0e8f72093c5fb3e4..bfd33603f67c98e4da5e13fa1ab19d58a6fd228d 100644
--- a/pkg/compiler/lib/src/inferrer/inferrer_visitor.dart
+++ b/pkg/compiler/lib/src/inferrer/inferrer_visitor.dart
@@ -58,6 +58,7 @@ abstract class TypeSystem<T> {
T get typeType;
T stringLiteralType(DartString value);
+ T boolLiteralType(LiteralBool value);
T nonNullSubtype(ClassElement type);
T nonNullSubclass(ClassElement type);
@@ -832,7 +833,7 @@ abstract class InferrerVisitor<T, E extends MinimalInferrerEngine<T>>
}
T visitLiteralBool(LiteralBool node) {
- return types.boolType;
+ return types.boolLiteralType(node);
}
T visitLiteralDouble(LiteralDouble node) {

Powered by Google App Engine
This is Rietveld 408576698