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

Unified Diff: pkg/analysis_services/test/index/dart_index_contributor_test.dart

Issue 398093003: Fix for name declaration indexing in for-in statement. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 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 | « pkg/analysis_services/lib/src/index/index_contributor.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_services/test/index/dart_index_contributor_test.dart
diff --git a/pkg/analysis_services/test/index/dart_index_contributor_test.dart b/pkg/analysis_services/test/index/dart_index_contributor_test.dart
index 423db1ef4f9c51bf0d1551367e3d925c23e1088a..991245978e097c4caaf1b7c296c916f07b36b793 100644
--- a/pkg/analysis_services/test/index/dart_index_contributor_test.dart
+++ b/pkg/analysis_services/test/index/dart_index_contributor_test.dart
@@ -152,6 +152,26 @@ main(A a, p) {
_expectedLocationQU(mainElement, 'method(); // ur'));
}
+ void test_NameElement_isDefinedBy_localVariable_inForEach() {
+ _indexTestUnit('''
+class A {
+ main() {
+ for (int test in []) {
+ }
+ }
+}
+''');
+ // prepare elements
+ Element mainElement = findElement('main');
+ LocalVariableElement testElement = findElement('test');
+ Element nameElement = new NameElement('test');
+ // verify
+ _assertRecordedRelation(
+ nameElement,
+ IndexConstants.NAME_IS_DEFINED_BY,
+ _expectedLocation(testElement, 'test in []'));
+ }
+
void test_NameElement_operator_resolved() {
_indexTestUnit('''
class A {
« no previous file with comments | « pkg/analysis_services/lib/src/index/index_contributor.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698