Index: pkg/analyzer/lib/src/generated/resolver.dart |
diff --git a/pkg/analyzer/lib/src/generated/resolver.dart b/pkg/analyzer/lib/src/generated/resolver.dart |
index 8b583239440b30e4cd1d90517f083dc7cfe9abe2..9c78da091b308c633fee69ec44ccd5dc898c594d 100644 |
--- a/pkg/analyzer/lib/src/generated/resolver.dart |
+++ b/pkg/analyzer/lib/src/generated/resolver.dart |
@@ -5141,7 +5141,7 @@ class InstanceFieldResolverVisitor extends ResolverVisitor { |
* Instances of the class `OverrideVerifier` visit all of the declarations in a compilation |
* unit to verify that if they have an override annotation it is being used correctly. |
*/ |
-class OverrideVerifier extends RecursiveAstVisitor<Object> { |
+class OverrideVerifier extends RecursiveAstVisitor { |
/** |
* The error reporter used to report errors. |
*/ |
@@ -5161,22 +5161,23 @@ class OverrideVerifier extends RecursiveAstVisitor<Object> { |
OverrideVerifier(this._errorReporter, this._manager); |
@override |
- Object visitFieldDeclaration(FieldDeclaration node) { |
+ visitFieldDeclaration(FieldDeclaration node) { |
for (VariableDeclaration field in node.fields.variables) { |
VariableElement fieldElement = field.element; |
if (fieldElement is FieldElement && _isOverride(fieldElement)) { |
- PropertyAccessorElement getterElement = fieldElement.getter; |
- if (_getOverriddenMember(getterElement) == null) { |
+ PropertyAccessorElement getter = fieldElement.getter; |
+ PropertyAccessorElement setter = fieldElement.setter; |
+ if (!(_getOverriddenMember(getter) != null || |
pquitslund
2016/07/26 05:32:49
Is it possible for `getter` to be null here? Do w
scheglov
2016/07/26 05:48:23
If other parts of analyzer work correctly, there s
Brian Wilkerson
2016/07/27 14:24:41
I'd rather that we just make other parts of analyz
|
+ setter != null && _getOverriddenMember(setter) != null)) { |
_errorReporter.reportErrorForNode( |
- HintCode.OVERRIDE_ON_NON_OVERRIDING_GETTER, field.name); |
+ HintCode.OVERRIDE_ON_NON_OVERRIDING_FIELD, field.name); |
} |
} |
} |
- return super.visitFieldDeclaration(node); |
} |
@override |
- Object visitMethodDeclaration(MethodDeclaration node) { |
+ visitMethodDeclaration(MethodDeclaration node) { |
ExecutableElement element = node.element; |
if (_isOverride(element)) { |
if (_getOverriddenMember(element) == null) { |
@@ -5194,7 +5195,6 @@ class OverrideVerifier extends RecursiveAstVisitor<Object> { |
} |
} |
} |
- return super.visitMethodDeclaration(node); |
} |
/** |