Index: pkg/analyzer/lib/src/task/strong/checker.dart |
diff --git a/pkg/analyzer/lib/src/task/strong/checker.dart b/pkg/analyzer/lib/src/task/strong/checker.dart |
index 7e00395e52b5b1bc96f2a7d8300094b14bdd3d80..568bf3069595ddaff612925f49439cd640106c25 100644 |
--- a/pkg/analyzer/lib/src/task/strong/checker.dart |
+++ b/pkg/analyzer/lib/src/task/strong/checker.dart |
@@ -633,6 +633,7 @@ class CodeChecker extends RecursiveAstVisitor { |
if (!rules.isSubtypeOf(returnType, lhsType)) { |
final numType = typeProvider.numType; |
+ // TODO(jmesserly): this seems to duplicate logic in StaticTypeAnalyzer. |
// Try to fix up the numerical case if possible. |
if (rules.isSubtypeOf(lhsType, numType) && |
rules.isSubtypeOf(lhsType, rhsType)) { |
@@ -640,6 +641,8 @@ class CodeChecker extends RecursiveAstVisitor { |
// compound operators in the int += num and num += dynamic cases. |
_recordImplicitCast(expr.rightHandSide, rhsType, lhsType); |
} else { |
+ // TODO(jmesserly): this results in a duplicate error, because |
+ // ErrorVerifier also reports it. |
_recordMessage(expr, StrongModeCode.STATIC_TYPE_ERROR, |
[expr, returnType, lhsType]); |
} |