Chromium Code Reviews| 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. |
| // |