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

Unified Diff: pkg/compiler/lib/src/inferrer/simple_types_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/simple_types_inferrer.dart
diff --git a/pkg/compiler/lib/src/inferrer/simple_types_inferrer.dart b/pkg/compiler/lib/src/inferrer/simple_types_inferrer.dart
index ec61e4bccadf59acddb70bcb96cba508f6965ed4..30c9c8c4a651b5c37eca67ed7b3734fee90a2328 100644
--- a/pkg/compiler/lib/src/inferrer/simple_types_inferrer.dart
+++ b/pkg/compiler/lib/src/inferrer/simple_types_inferrer.dart
@@ -121,6 +121,7 @@ class TypeMaskSystem implements TypeSystem<TypeMask> {
bool isNull(TypeMask mask) => mask.isEmpty && mask.isNullable;
TypeMask stringLiteralType(ast.DartString value) => stringType;
+ TypeMask boolLiteralType(ast.LiteralBool value) => boolType;
TypeMask nonNullSubtype(ClassElement type)
=> new TypeMask.nonNullSubtype(type.declaration, classWorld);

Powered by Google App Engine
This is Rietveld 408576698