Index: pkg/front_end/lib/src/fasta/type_inference/type_inferrer.dart |
diff --git a/pkg/front_end/lib/src/fasta/type_inference/type_inferrer.dart b/pkg/front_end/lib/src/fasta/type_inference/type_inferrer.dart |
index ff133dd3939abdd2f2067b2618bb960c3754b9f8..28edb199bae95470d92d03f9e014c097176e8bdc 100644 |
--- a/pkg/front_end/lib/src/fasta/type_inference/type_inferrer.dart |
+++ b/pkg/front_end/lib/src/fasta/type_inference/type_inferrer.dart |
@@ -78,6 +78,14 @@ abstract class TypeInferrerImpl<S, E, V, F> extends TypeInferrer<S, E, V, F> { |
/// initializer. |
E getFieldInitializer(F field); |
+ /// Performs the core type inference algorithm for boolean literals. |
+ /// |
+ /// [typeContext], [typeNeeded], and the return value behave as described in |
+ /// [inferExpression]. |
+ DartType inferBoolLiteral(DartType typeContext, bool typeNeeded) { |
+ return typeNeeded ? coreTypes.boolClass.rawType : null; |
+ } |
+ |
/// Performs the core type inference algorithm for double literals. |
/// |
/// [typeContext], [typeNeeded], and the return value behave as described in |
@@ -201,6 +209,14 @@ abstract class TypeInferrerImpl<S, E, V, F> extends TypeInferrer<S, E, V, F> { |
return typeNeeded ? getterType : null; |
} |
+ /// Performs the core type inference algorithm for string literals. |
+ /// |
+ /// [typeContext], [typeNeeded], and the return value behave as described in |
+ /// [inferExpression]. |
+ DartType inferStringLiteral(DartType typeContext, bool typeNeeded) { |
+ return typeNeeded ? coreTypes.stringClass.rawType : null; |
+ } |
+ |
/// Performs the core type inference algorithm for variable declarations. |
/// |
/// [declaredType] is the declared type of the variable, or `null` if the type |