Skip to content

Commit fd0db18

Browse files
scheglovCommit Queue
authored andcommitted
Elements. Migrate LibraryBuilder.
Change-Id: I68b918ff98f02428d59852db88832b078c3cdae2 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/415327 Commit-Queue: Konstantin Shcheglov <[email protected]> Reviewed-by: Brian Wilkerson <[email protected]>
1 parent 9f47dc3 commit fd0db18

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7334,7 +7334,7 @@ class LibraryElementImpl extends ElementImpl
73347334
}
73357335

73367336
@override
7337-
Iterable<Element> get topLevelElements sync* {
7337+
Iterable<ElementImpl> get topLevelElements sync* {
73387338
for (var unit in units) {
73397339
yield* unit.accessors;
73407340
yield* unit.classes;

pkg/analyzer/lib/src/summary2/library_builder.dart

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,8 @@
22
// for details. All rights reserved. Use of this source code is governed by a
33
// BSD-style license that can be found in the LICENSE file.
44

5-
// ignore_for_file: analyzer_use_new_elements
6-
75
import 'package:_fe_analyzer_shared/src/field_promotability.dart';
86
import 'package:analyzer/dart/analysis/features.dart';
9-
import 'package:analyzer/dart/element/element.dart';
107
import 'package:analyzer/dart/element/element2.dart';
118
import 'package:analyzer/src/dart/analysis/file_state.dart' as file_state;
129
import 'package:analyzer/src/dart/analysis/file_state.dart' hide DirectiveUri;
@@ -738,7 +735,7 @@ class LibraryBuilder {
738735
/// might be not available yet. So, we create references together with the
739736
/// library, and create the fragment and element later.
740737
void _createLoadLibraryReferences() {
741-
var name = FunctionElement.LOAD_LIBRARY_NAME;
738+
var name = TopLevelFunctionElement.LOAD_LIBRARY_NAME;
742739

743740
var fragmentContainer = units[0].reference.getChild('@function');
744741
var fragmentReference = fragmentContainer.addChild(name);
@@ -870,8 +867,8 @@ class LinkingUnit {
870867
});
871868
}
872869

873-
/// This class examines all the [InterfaceElement]s in a library and determines
874-
/// which fields are promotable within that library.
870+
/// This class examines all the [InterfaceElementImpl2]s in a library and
871+
/// determines which fields are promotable within that library.
875872
class _FieldPromotability extends FieldPromotability<InterfaceElementImpl2,
876873
FieldElementImpl2, GetterElementImpl> {
877874
/// The [_libraryBuilder] for the library being analyzed.

0 commit comments

Comments
 (0)