Skip to content

Commit b6bf94c

Browse files
committed
Elements. Deprecate LibraryExportElement.
Change-Id: I00d7ded2ef5100702a5989492d731aaf4668d670 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/418923 Commit-Queue: Konstantin Shcheglov <[email protected]> Reviewed-by: Paul Berry <[email protected]>
1 parent 12b5c2e commit b6bf94c

File tree

3 files changed

+12
-4
lines changed

3 files changed

+12
-4
lines changed

pkg/analyzer/api.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3393,14 +3393,14 @@ package:analyzer/dart/element/element.dart:
33933393
typeSystem (getter: TypeSystem)
33943394
units (getter: List<CompilationUnitElement>, deprecated)
33953395
getClass (method: ClassElement? Function(String), deprecated)
3396-
LibraryExportElement (class extends Object implements _ExistingElement):
3396+
LibraryExportElement (class extends Object implements _ExistingElement, deprecated):
33973397
new (constructor: LibraryExportElement Function())
33983398
combinators (getter: List<NamespaceCombinator>)
33993399
enclosingElement3 (getter: CompilationUnitElement, deprecated)
34003400
exportKeywordOffset (getter: int)
34013401
exportedLibrary (getter: LibraryElement?)
34023402
uri (getter: DirectiveUri)
3403-
LibraryImportElement (class extends Object implements _ExistingElement):
3403+
LibraryImportElement (class extends Object implements _ExistingElement, deprecated):
34043404
new (constructor: LibraryImportElement Function())
34053405
combinators (getter: List<NamespaceCombinator>)
34063406
enclosingElement3 (getter: CompilationUnitElement, deprecated)

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1747,6 +1747,7 @@ abstract class LibraryElement implements _ExistingElement {
17471747
/// A single export directive within a library.
17481748
///
17491749
/// Clients may not extend, implement or mix-in this class.
1750+
@Deprecated('Use LibraryExport instead')
17501751
abstract class LibraryExportElement implements _ExistingElement {
17511752
/// The combinators that were specified as part of the `export` directive in
17521753
/// the order in which they were specified.
@@ -1769,6 +1770,7 @@ abstract class LibraryExportElement implements _ExistingElement {
17691770
/// A single import directive within a library.
17701771
///
17711772
/// Clients may not extend, implement or mix-in this class.
1773+
@Deprecated('Use LibraryImport instead')
17721774
abstract class LibraryImportElement implements _ExistingElement {
17731775
/// The combinators that were specified as part of the `import` directive in
17741776
/// the order in which they were specified.

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

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7511,7 +7511,10 @@ class LibraryElementImpl extends ElementImpl
75117511
}
75127512

75137513
class LibraryExportElementImpl extends _ExistingElementImpl
7514-
implements LibraryExportElement, LibraryExport {
7514+
implements
7515+
// ignore:deprecated_member_use_from_same_package
7516+
LibraryExportElement,
7517+
LibraryExport {
75157518
@override
75167519
final List<NamespaceCombinator> combinators;
75177520

@@ -7571,7 +7574,10 @@ class LibraryExportElementImpl extends _ExistingElementImpl
75717574
}
75727575

75737576
class LibraryImportElementImpl extends _ExistingElementImpl
7574-
implements LibraryImportElement, LibraryImport {
7577+
implements
7578+
// ignore:deprecated_member_use_from_same_package
7579+
LibraryImportElement,
7580+
LibraryImport {
75757581
@override
75767582
final List<NamespaceCombinator> combinators;
75777583

0 commit comments

Comments
 (0)