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 0a54caa945d7caa6d04eff3b93240b1e30095c02..d7b7867704c348d562e63119d418950c41da4632 100644 |
--- a/pkg/analyzer/lib/src/generated/error_verifier.dart |
+++ b/pkg/analyzer/lib/src/generated/error_verifier.dart |
@@ -4393,10 +4393,9 @@ class ErrorVerifier extends RecursiveAstVisitor<Object> { |
void _checkForMissingJSLibAnnotation(Annotation node) { |
if (node.elementAnnotation?.isJS ?? false) { |
- Element element = ElementLocator.locate(node.parent); |
- if (element?.library?.isJS != true) { |
+ if (_currentLibrary.isJS != true) { |
pquitslund
2016/07/29 20:14:30
Is `_currentLibrary` certain to be non-null? Or d
Brian Wilkerson
2016/07/29 20:19:37
Yes. (It's a final field initialized in the constr
|
_errorReporter.reportErrorForNode( |
- HintCode.MISSING_JS_LIB_ANNOTATION, node, [element.name]); |
+ HintCode.MISSING_JS_LIB_ANNOTATION, node); |
} |
} |
} |