Skip to content

Commit 026362d

Browse files
stereotype441Commit Queue
authored andcommitted
[analyzer] Fix incorrect doc references to CompilationUnitElement.
There is no `CompilationUnitElement` anymore. It has been replaced with `LibraryFragment`. This is a step towards enabling the `comment_references` lint in the analyzer codebase. Change-Id: I6a6a696403c7b1f060cd3ed5755f6575cd1ad918 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/450740 Auto-Submit: Paul Berry <[email protected]> Commit-Queue: Konstantin Shcheglov <[email protected]> Reviewed-by: Konstantin Shcheglov <[email protected]> Reviewed-by: Brian Wilkerson <[email protected]> Commit-Queue: Brian Wilkerson <[email protected]>
1 parent de4c5b1 commit 026362d

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

pkg/analyzer/lib/src/dart/analysis/search.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1598,7 +1598,7 @@ class _IndexRequest {
15981598
return results;
15991599
}
16001600

1601-
/// Return the identifier of the [CompilationUnitElementIml] containing the
1601+
/// Return the identifier of the [LibraryFragmentImpl] containing the
16021602
/// [element] in the [index] or `-1` if not found.
16031603
int getUnitId(Element element) {
16041604
var unitElement = getUnitElement(element);

pkg/analyzer/lib/src/dart/element/element.dart

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3573,14 +3573,10 @@ abstract class FragmentImpl with _FragmentImplMixin implements Fragment {
35733573
/// The unique integer identifier of this fragment.
35743574
final int id = _NEXT_ID++;
35753575

3576-
/// The element that either physically or logically encloses this element.
3576+
/// The fragment that either physically or logically encloses this fragment.
35773577
///
3578-
/// For [LibraryElement] returns `null`, because libraries are the top-level
3579-
/// elements in the model.
3580-
///
3581-
/// For [CompilationUnitElement] returns the [CompilationUnitElement] that
3582-
/// uses `part` directive to include this element, or `null` if this element
3583-
/// is the defining unit of the library.
3578+
/// For [LibraryFragment] returns `null`, because library fragments are the
3579+
/// top-level fragments in the model.
35843580
@override
35853581
FragmentImpl? enclosingFragment;
35863582

0 commit comments

Comments
 (0)