| 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 182b654675acfd59052ba63c887e1564608f5eb4..5c9d6ee8ed9ff30c801009ae389e8a7052793ab0 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
|
| @@ -82,6 +82,16 @@ 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 type cast expressions.
|
| + ///
|
| + /// [typeContext], [typeNeeded], and the return value behave as described in
|
| + /// [inferExpression].
|
| + DartType inferAsExpression(
|
| + DartType typeContext, bool typeNeeded, E operand, DartType type) {
|
| + inferExpression(operand, null, false);
|
| + return typeNeeded ? type : null;
|
| + }
|
| +
|
| /// Performs the core type inference algorithm for boolean literals.
|
| ///
|
| /// [typeContext], [typeNeeded], and the return value behave as described in
|
| @@ -249,14 +259,6 @@ 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 string concatenations.
|
| ///
|
| /// [typeContext], [typeNeeded], and the return value behave as described in
|
| @@ -269,6 +271,14 @@ abstract class TypeInferrerImpl<S, E, V, F> extends TypeInferrer<S, E, V, F> {
|
| return typeNeeded ? coreTypes.stringClass.rawType : 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
|
|
|