| Index: pkg/compiler/lib/src/inferrer/builder_kernel.dart
|
| diff --git a/pkg/compiler/lib/src/inferrer/builder_kernel.dart b/pkg/compiler/lib/src/inferrer/builder_kernel.dart
|
| index 659ac98e239ecf5a29210ab8a31100e2fccaa413..a2739301b5b2f48208d8813356396f22f69f42cd 100644
|
| --- a/pkg/compiler/lib/src/inferrer/builder_kernel.dart
|
| +++ b/pkg/compiler/lib/src/inferrer/builder_kernel.dart
|
| @@ -149,12 +149,21 @@ class KernelTypeGraphBuilder extends ir.Visitor<TypeInformation> {
|
| }
|
|
|
| @override
|
| - TypeInformation defaultExpression(ir.Expression expression) {
|
| - // TODO(efortuna): Remove when more is implemented.
|
| + TypeInformation defaultExpression(ir.Expression node) {
|
| + // TODO(johnniwinther): Make this throw to assert that all expressions are
|
| + // handled.
|
| return _types.dynamicType;
|
| }
|
|
|
| @override
|
| + TypeInformation defaultStatement(ir.Statement node) {
|
| + // TODO(johnniwinther): Make this throw to assert that all statements are
|
| + // handled.
|
| + node.visitChildren(this);
|
| + return null;
|
| + }
|
| +
|
| + @override
|
| TypeInformation visitNullLiteral(ir.NullLiteral literal) {
|
| return _types.nullType;
|
| }
|
| @@ -236,4 +245,13 @@ class KernelTypeGraphBuilder extends ir.Visitor<TypeInformation> {
|
| TypeInformation visitVariableGet(ir.VariableGet node) {
|
| return _locals.use(_localsMap.getLocalVariable(node.variable));
|
| }
|
| +
|
| + @override
|
| + TypeInformation visitVariableSet(ir.VariableSet node) {
|
| + Local local = _localsMap.getLocalVariable(node.variable);
|
| + DartType type = _localsMap.getLocalType(_elementMap, local);
|
| + TypeInformation rhsType = visit(node.value);
|
| + _locals.update(local, rhsType, node, type);
|
| + return rhsType;
|
| + }
|
| }
|
|
|