Index: pkg/analyzer/lib/src/generated/element_resolver.dart |
diff --git a/pkg/analyzer/lib/src/generated/element_resolver.dart b/pkg/analyzer/lib/src/generated/element_resolver.dart |
index b61eb2bdbf2efeb36a9fdbbffc882c05e6bc48c1..d3fdd99d07a9d983d8c66d7b174d6216dc5c9f12 100644 |
--- a/pkg/analyzer/lib/src/generated/element_resolver.dart |
+++ b/pkg/analyzer/lib/src/generated/element_resolver.dart |
@@ -1847,12 +1847,13 @@ class ElementResolver extends SimpleAstVisitor<Object> { |
// for `staticType` and `propagatedType` on Expression. |
DartType _propagatedInvokeTypeIfBetter( |
DartType propagatedType, DartType staticType) { |
- if (propagatedType != null && |
- (staticType == null || propagatedType.isMoreSpecificThan(staticType))) { |
- return propagatedType; |
- } else { |
+ if (_resolver.strongMode || propagatedType == null) { |
return null; |
} |
+ if (staticType == null || propagatedType.isMoreSpecificThan(staticType)) { |
+ return propagatedType; |
+ } |
+ return null; |
} |
/** |