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

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

Issue 1620203006: set LibraryElement documentation to docs of first directive in CU (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 11 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/task/dart.dart
diff --git a/pkg/analyzer/lib/src/task/dart.dart b/pkg/analyzer/lib/src/task/dart.dart
index 56fc384bb758da3271b428e29ba36ea35e3b5642..482ece8b5d29a490e0ea552d5d709dbcf1865c7a 100644
--- a/pkg/analyzer/lib/src/task/dart.dart
+++ b/pkg/analyzer/lib/src/task/dart.dart
@@ -1492,9 +1492,12 @@ class BuildLibraryElementTask extends SourceBasedAnalysisTask {
directive.element = libraryElement;
}
BuildLibraryElementUtils.patchTopLevelAccessors(libraryElement);
- if (libraryDirective != null) {
- _setDoc(libraryElement, libraryDirective);
+ // set the library documentation to the docs associated with the first
+ // directive in the compilation unit.
+ if (definingCompilationUnit.directives.isNotEmpty) {
+ _setDoc(libraryElement, definingCompilationUnit.directives.first);
Brian Wilkerson 2016/01/22 22:44:52 Given that this was the only use of `libraryDirect
keertip 2016/01/23 00:12:04 Done.
}
+
//
// Record outputs.
//
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698