Skip to content

Commit 204338d

Browse files
stereotype441commit-bot@chromium.org
authored andcommitted
Fix reporting of HintCode.INVALID_VISIBLE_FOR_OVERRIDING_ANNOTATION
The hint code text is: The declaration '{0}' is annotated with 'visibleForOverriding'. As '{0}' is not an interface member that could be overriden, the annotation is meaningless. So when instantiating this error we should only provide a single argument. Previously we were providing a second argument that was the name of the annotation; this is unnecessary because the error message already mentions the annotation name ('visibleForOverriding'). Change-Id: I022af6914668ad6232005237619b3ab9a5d7a589 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213825 Reviewed-by: Brian Wilkerson <[email protected]> Commit-Queue: Paul Berry <[email protected]>
1 parent 98d28c0 commit 204338d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/analyzer/lib/src/error/best_practices_verifier.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ class BestPracticesVerifier extends RecursiveAstVisitor<void> {
240240
_errorReporter.reportErrorForNode(
241241
HintCode.INVALID_VISIBLE_FOR_OVERRIDING_ANNOTATION,
242242
node,
243-
[declaredElement.name, node.name.name]);
243+
[declaredElement.name]);
244244
}
245245

246246
if (parent is TopLevelVariableDeclaration) {

0 commit comments

Comments
 (0)