Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stop using 'augmented' from the element model. #3878

Merged
merged 1 commit into from
Sep 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions lib/src/model/inheriting_container.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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<Constructor> constructors = element.augmented.constructors
late final List<Constructor> constructors = element.constructors
.map((e) => getModelFor(e, library) as Constructor)
.toList(growable: false);

Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -249,7 +249,7 @@ abstract class InheritingContainer extends Container {
}();

@override
late final List<Method> declaredMethods = element.augmented.methods
late final List<Method> declaredMethods = element.methods
.map((e) => getModelFor(e, library) as Method)
.toList(growable: false);

Expand Down
2 changes: 1 addition & 1 deletion lib/src/model/method.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down