| Index: pkg/compiler/lib/src/cps_ir/type_propagation.dart
|
| diff --git a/pkg/compiler/lib/src/cps_ir/type_propagation.dart b/pkg/compiler/lib/src/cps_ir/type_propagation.dart
|
| index ab1b0c0a702eb24620a8a90947f7d2caa029d0fe..2e2da582d2a10fcb850cac6e2716f41d6258305f 100644
|
| --- a/pkg/compiler/lib/src/cps_ir/type_propagation.dart
|
| +++ b/pkg/compiler/lib/src/cps_ir/type_propagation.dart
|
| @@ -2551,7 +2551,16 @@ class TypePropagationVisitor implements Visitor {
|
| void visitInterceptor(Interceptor node) {
|
| push(node.input.definition);
|
| AbstractValue value = getValue(node.input.definition);
|
| - if (!value.isNothing) {
|
| + if (value.isNothing) {
|
| + setValue(node, nothing);
|
| + } else if (value.isNullable &&
|
| + !node.interceptedClasses.contains(backend.jsNullClass)) {
|
| + // If the input is null and null is not mapped to an interceptor then
|
| + // null gets returned.
|
| + // TODO(asgerf): Add the NullInterceptor when it enables us to
|
| + // propagate an assignment.
|
| + setValue(node, nonConstant());
|
| + } else {
|
| setValue(node, nonConstant(typeSystem.nonNullType));
|
| }
|
| }
|
|
|