diff --git a/pkg/analyzer/CHANGELOG.md b/pkg/analyzer/CHANGELOG.md index e3461edeb7b..3587b8d80de 100644 --- a/pkg/analyzer/CHANGELOG.md +++ b/pkg/analyzer/CHANGELOG.md @@ -9,6 +9,9 @@ * Deprecate `AnalysisError.correction` field; use `AnalysisError.correctionMessage` instead. * Deprecate `ErrorType`; use `DiagnosticType` instead. +* Change `ElementDirective` from `sealed` to `abstract`. + This allows the analyzer to have an internal implementation + class corresponding to `ElementDirective`. ## 7.4.1 * Restore `InstanceElement.augmented` getter. diff --git a/pkg/analyzer/api.txt b/pkg/analyzer/api.txt index 76bb8652c56..5a8168ea6d8 100644 --- a/pkg/analyzer/api.txt +++ b/pkg/analyzer/api.txt @@ -3115,7 +3115,8 @@ package:analyzer/dart/element/element.dart: isWidgetFactory (getter: bool) computeConstantValue (method: DartObject? Function()) toSource (method: String Function()) - ElementDirective (class extends Object implements Annotatable, sealed (immediate subtypes: LibraryExport, LibraryImport, PartInclude)): + ElementDirective (class extends Object implements Annotatable): + new (constructor: ElementDirective Function()) libraryFragment (getter: LibraryFragment) uri (getter: DirectiveUri) ElementKind (class extends Object implements Comparable): diff --git a/pkg/analyzer/lib/dart/element/element.dart b/pkg/analyzer/lib/dart/element/element.dart index 8c9602c3a87..7dffcdef2a5 100644 --- a/pkg/analyzer/lib/dart/element/element.dart +++ b/pkg/analyzer/lib/dart/element/element.dart @@ -845,7 +845,7 @@ abstract class ElementAnnotation implements ConstantEvaluationTarget { /// A directive within a library fragment. /// /// Clients may not extend, implement or mix-in this class. -sealed class ElementDirective implements Annotatable { +abstract class ElementDirective implements Annotatable { /// The library fragment that contains this object. LibraryFragment get libraryFragment;