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

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

Issue 1681493005: Fix for recording 'null' as a defined element. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 10 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/src/task/dart_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/resolver.dart
diff --git a/pkg/analyzer/lib/src/generated/resolver.dart b/pkg/analyzer/lib/src/generated/resolver.dart
index 1c3a644d230aa3c51518fe6a85c617a7e7cfd14f..ac5513cc217f76725aa36f76daa37d143f8b9a04 100644
--- a/pkg/analyzer/lib/src/generated/resolver.dart
+++ b/pkg/analyzer/lib/src/generated/resolver.dart
@@ -4073,7 +4073,9 @@ class GatherUsedLocalElementsVisitor extends RecursiveAstVisitor {
visitSimpleIdentifier(SimpleIdentifier node) {
Element element = node.staticElement;
if (node.inDeclarationContext()) {
- definedElements.add(element);
+ if (element != null) {
+ definedElements.add(element);
+ }
return;
}
bool isIdentifierRead = _isReadIdentifier(node);
« no previous file with comments | « no previous file | pkg/analyzer/test/src/task/dart_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698