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

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

Issue 2196483004: Check for missing elements (issue 26987) (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Fix failing test and simplify implementation Created 4 years, 5 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/generated/hint_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 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);
}
}
}
« no previous file with comments | « no previous file | pkg/analyzer/test/generated/hint_code_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698