| Index: pkg/compiler/lib/src/typechecker.dart
|
| diff --git a/pkg/compiler/lib/src/typechecker.dart b/pkg/compiler/lib/src/typechecker.dart
|
| index 01cff2d5f281a33291f931338dffa55057979835..3cf8a5681470731b31fbec03eb9836f952779095 100644
|
| --- a/pkg/compiler/lib/src/typechecker.dart
|
| +++ b/pkg/compiler/lib/src/typechecker.dart
|
| @@ -1776,7 +1776,7 @@ class TypeCheckerVisitor extends Visitor<DartType> {
|
| void analyzeVariableInitializer(
|
| Spannable spannable, DartType declaredType, Node initializer) {
|
| if (initializer == null) return;
|
| -
|
| +
|
| DartType expressionType = analyzeNonVoid(initializer);
|
| checkAssignable(spannable, expressionType, declaredType);
|
| }
|
| @@ -1791,9 +1791,7 @@ class TypeCheckerVisitor extends Visitor<DartType> {
|
| message: 'expected identifier or initialization');
|
| if (definition is SendSet) {
|
| SendSet initialization = definition;
|
| - analyzeVariableInitializer(
|
| - initialization.assignmentOperator,
|
| - type,
|
| + analyzeVariableInitializer(initialization.assignmentOperator, type,
|
| initialization.arguments.head);
|
| // TODO(sigmund): explore inferring a type for `var` using the RHS (like
|
| // DDC does), for example:
|
|
|