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

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

Issue 698973005: Always check if instance method name collides with superclass static. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 1 month 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/generated/static_warning_code_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 74542c12a446f0de0a58595754e5620f120a426d..b006e091bd4c1bb76af94899a99db8a529772cce 100644
--- a/pkg/analyzer/lib/src/generated/error_verifier.dart
+++ b/pkg/analyzer/lib/src/generated/error_verifier.dart
@@ -1418,12 +1418,9 @@ class ErrorVerifier extends RecursiveAstVisitor<Object> {
// Compute the overridden executable from the InheritanceManager
//
List<ExecutableElement> overriddenExecutables = _inheritanceManager.lookupOverrides(_enclosingClass, executableElement.name);
- if (overriddenExecutables.isEmpty) {
- // Nothing is overridden, so we just have to check if the new name collides
- // with a static defined in the superclass.
- // TODO(paulberry): currently we don't do this check if the new element
- // overrides a method in an interface (see issue 18947).
- return _checkForInstanceMethodNameCollidesWithSuperclassStatic(executableElement, errorNameTarget);
+ if (_checkForInstanceMethodNameCollidesWithSuperclassStatic(
+ executableElement, errorNameTarget)) {
+ return true;
}
for (ExecutableElement overriddenElement in overriddenExecutables) {
if (_checkForAllInvalidOverrideErrorCodes(executableElement, overriddenElement, parameters, parameterLocations, errorNameTarget)) {
« no previous file with comments | « no previous file | pkg/analyzer/test/generated/static_warning_code_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698