Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(656)

Unified Diff: pkg/analyzer/lib/src/generated/error_verifier.dart

Issue 2340173002: address #25232 in strong mode (dart1 behavior unchanged) (Closed)
Patch Set: Merge remote-tracking branch 'origin/master' into 25232_strong_fix Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | pkg/analyzer/test/src/task/strong/checker_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/generated/error_verifier.dart
diff --git a/pkg/analyzer/lib/src/generated/error_verifier.dart b/pkg/analyzer/lib/src/generated/error_verifier.dart
index 99536e05854096ba17e42c0ce4cd4c3014940cdf..47a4979d56e5662fe2886d6bf6c088b20375fbc9 100644
--- a/pkg/analyzer/lib/src/generated/error_verifier.dart
+++ b/pkg/analyzer/lib/src/generated/error_verifier.dart
@@ -5043,7 +5043,15 @@ class ErrorVerifier extends RecursiveAstVisitor<Object> {
_typeProvider, foundConcreteFT);
requiredMemberFT = _typeSystem.functionTypeToConcreteType(
_typeProvider, requiredMemberFT);
- if (_typeSystem.isSubtypeOf(foundConcreteFT, requiredMemberFT)) {
+
+ // Strong mode does override checking for types in CodeChecker, so
+ // we can skip it here. Doing it here leads to unnecessary duplicate
+ // error messages in subclasses that inherit from one that has an
+ // override error.
+ //
+ // See: https://github.com/dart-lang/sdk/issues/25232
+ if (_options.strongMode ||
+ _typeSystem.isSubtypeOf(foundConcreteFT, requiredMemberFT)) {
continue;
}
}
« no previous file with comments | « no previous file | pkg/analyzer/test/src/task/strong/checker_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698