From c2f6eb863c91c4fcab9cc5f9ecc6b3b2b0ba1d6e Mon Sep 17 00:00:00 2001 From: Konstantin Shcheglov Date: Thu, 12 Sep 2024 09:04:52 -0700 Subject: [PATCH] Stop using 'augmented' from the element model. --- lib/src/model/inheriting_container.dart | 12 ++++++------ lib/src/model/method.dart | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/src/model/inheriting_container.dart b/lib/src/model/inheriting_container.dart index 5bedb4dd07..e769d682d2 100644 --- a/lib/src/model/inheriting_container.dart +++ b/lib/src/model/inheriting_container.dart @@ -19,7 +19,7 @@ import 'package:meta/meta.dart'; /// Note that [Constructor]s are not considered to be modifiers so a /// [hasModifiers] override is not necessary for this mixin. mixin Constructable implements InheritingContainer { - late final List constructors = element.augmented.constructors + late final List constructors = element.constructors .map((e) => getModelFor(e, library) as Constructor) .toList(growable: false); @@ -146,12 +146,12 @@ abstract class InheritingContainer extends Container { // The mapping of all of the inherited element names to their _concrete_ // implementation element. - var concreteInheritanceMap = packageGraph.inheritanceManager - .getInheritedConcreteMap2(element.augmented.declaration); + var concreteInheritanceMap = + packageGraph.inheritanceManager.getInheritedConcreteMap2(element); // The mapping of all inherited element names to the nearest inherited // element that they resolve to. - var inheritanceMap = packageGraph.inheritanceManager - .getInheritedMap2(element.augmented.declaration); + var inheritanceMap = + packageGraph.inheritanceManager.getInheritedMap2(element); var inheritanceChainElements = inheritanceChain.map((c) => c.element).toList(growable: false); @@ -249,7 +249,7 @@ abstract class InheritingContainer extends Container { }(); @override - late final List declaredMethods = element.augmented.methods + late final List declaredMethods = element.methods .map((e) => getModelFor(e, library) as Method) .toList(growable: false); diff --git a/lib/src/model/method.dart b/lib/src/model/method.dart index 8b569f629f..86a553d681 100644 --- a/lib/src/model/method.dart +++ b/lib/src/model/method.dart @@ -124,7 +124,7 @@ class Method extends ModelElement return null; } var parent = element.enclosingElement3 as InterfaceElement; - for (var t in parent.augmented.declaration.allSupertypes) { + for (var t in parent.allSupertypes) { Element? e = t.getMethod(element.name); if (e != null) { assert(