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

Unified Diff: pkg/analyzer/lib/src/dart/element/element.dart

Issue 1828793002: Fix for searching LocalVariableElement of DeclaredIdentifier. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 9 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
Index: pkg/analyzer/lib/src/dart/element/element.dart
diff --git a/pkg/analyzer/lib/src/dart/element/element.dart b/pkg/analyzer/lib/src/dart/element/element.dart
index c91582c6790c254570da2683ba442e3a558513fd..b3ba3e3d8193008cb27c97f7683d0ca1604edd14 100644
--- a/pkg/analyzer/lib/src/dart/element/element.dart
+++ b/pkg/analyzer/lib/src/dart/element/element.dart
@@ -3758,8 +3758,8 @@ class LocalVariableElementImpl extends VariableElementImpl
}
@override
- VariableDeclaration computeNode() =>
- getNodeMatching((node) => node is VariableDeclaration);
+ Declaration computeNode() => getNodeMatching(
+ (node) => node is DeclaredIdentifier || node is VariableDeclaration);
/**
* Set the visible range for this element to the range starting at the given
« no previous file with comments | « pkg/analysis_server/test/services/search/search_engine_test.dart ('k') | pkg/analyzer/test/src/dart/element/element_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698