Index: pkg/compiler/lib/src/inferrer/simple_types_inferrer.dart |
diff --git a/pkg/compiler/lib/src/inferrer/simple_types_inferrer.dart b/pkg/compiler/lib/src/inferrer/simple_types_inferrer.dart |
index 42cb1865b31f3f98881a2c53c5f46dd5ecb90ad8..5197d5bfbe3e5314a7f33fd62f38502056227360 100644 |
--- a/pkg/compiler/lib/src/inferrer/simple_types_inferrer.dart |
+++ b/pkg/compiler/lib/src/inferrer/simple_types_inferrer.dart |
@@ -850,9 +850,12 @@ class SimpleTypeInferrerVisitor<T> |
isCallOnThis = true; |
} |
} else { |
- if (node.receiver != null && elements[node.receiver] is! PrefixElement) { |
- // TODO(johnniwinther): Avoid blindly recursing on the receiver. |
- receiverType = visit(node.receiver); |
+ if (node.receiver != null) { |
+ Element receiver = elements[node.receiver]; |
+ if (receiver is! PrefixElement && receiver is! ClassElement) { |
+ // TODO(johnniwinther): Avoid blindly recursing on the receiver. |
+ receiverType = visit(node.receiver); |
+ } |
} |
isCallOnThis = isThisOrSuper(node.receiver); |
} |