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

Unified Diff: pkg/analyzer/lib/src/dart/analysis/driver.dart

Issue 2575683002: Fix for searching top-level declarations in parts. (Closed)
Patch Set: Created 4 years 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/dart/analysis/driver_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/dart/analysis/driver.dart
diff --git a/pkg/analyzer/lib/src/dart/analysis/driver.dart b/pkg/analyzer/lib/src/dart/analysis/driver.dart
index 5f8be4c71509ffb422986a4f0364fea5d3a7bf6f..a362771debb68339b52b03623ac369d82b827ddd 100644
--- a/pkg/analyzer/lib/src/dart/analysis/driver.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/driver.dart
@@ -1573,6 +1573,9 @@ class _TopLevelNameDeclarationsTask {
if (!file.isPart) {
bool isExported = false;
TopLevelDeclaration declaration = file.topLevelDeclarations[name];
+ for (FileState part in file.partedFiles) {
+ declaration ??= part.topLevelDeclarations[name];
+ }
if (declaration == null) {
declaration = file.exportedTopLevelDeclarations[name];
isExported = true;
« no previous file with comments | « no previous file | pkg/analyzer/test/src/dart/analysis/driver_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698