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 5784d3ddf1e613cd186ca88c6cc0b17efe3c56a3..39f33b43de50abd20cfd40031c3834ccac1384e3 100644 |
--- a/pkg/compiler/lib/src/cps_ir/type_propagation.dart |
+++ b/pkg/compiler/lib/src/cps_ir/type_propagation.dart |
@@ -1718,6 +1718,9 @@ class TransformingVisitor extends DeepRecursiveVisitor { |
if (specializeSingleUseClosureCall(node)) return; |
if (specializeClosureCall(node)) return; |
+ node.mask = |
+ typeSystem.intersection(node.mask, getValue(getDartReceiver(node)).type); |
+ |
AbstractValue receiver = getValue(node.receiver.definition); |
if (node.receiverIsIntercepted && |
@@ -2743,9 +2746,9 @@ class TypePropagationVisitor implements Visitor { |
case AbstractBool.Maybe: |
setReachable(cont); |
// Narrow type of output to those that survive the cast. |
- TypeMask type = input.type.intersection( |
- typeSystem.subtypesOf(node.dartType), |
- classWorld); |
+ TypeMask type = typeSystem.intersection( |
+ input.type, |
+ typeSystem.subtypesOf(node.dartType)); |
setValue(cont.parameters.single, nonConstant(type)); |
break; |
} |