Index: pkg/front_end/lib/src/fasta/type_inference/type_inferrer.dart |
diff --git a/pkg/front_end/lib/src/fasta/type_inference/type_inferrer.dart b/pkg/front_end/lib/src/fasta/type_inference/type_inferrer.dart |
index 5faf37545711d5ed2cb9da440701048008975739..1efc05f797d9bc72eb9666fa44ef0d924e07853e 100644 |
--- a/pkg/front_end/lib/src/fasta/type_inference/type_inferrer.dart |
+++ b/pkg/front_end/lib/src/fasta/type_inference/type_inferrer.dart |
@@ -664,7 +664,9 @@ abstract class TypeInferrerImpl extends TypeInferrer { |
listener.methodInvocationEnter(expression, typeContext) || typeNeeded; |
// First infer the receiver so we can look up the method that was invoked. |
var receiverType = inferExpression(receiver, null, true); |
- receiverVariable?.type = receiverType; |
+ if (strongMode) { |
+ receiverVariable?.type = receiverType; |
+ } |
bool isOverloadedArithmeticOperator = false; |
Member interfaceMember = |
findMethodInvocationMember(receiverType, desugaredInvocation); |
@@ -719,7 +721,9 @@ abstract class TypeInferrerImpl extends TypeInferrer { |
listener.propertyGetEnter(expression, typeContext) || typeNeeded; |
// First infer the receiver so we can look up the getter that was invoked. |
var receiverType = inferExpression(receiver, null, true); |
- receiverVariable?.type = receiverType; |
+ if (strongMode) { |
+ receiverVariable?.type = receiverType; |
+ } |
Member interfaceMember = |
findInterfaceMember(receiverType, desugaredGet.name, fileOffset); |
if (isTopLevel && |