Skip to content

Commit

Permalink
Stop using 'augmented' from the element model.
Browse files Browse the repository at this point in the history
  • Loading branch information
scheglov committed Sep 12, 2024
1 parent d6b865f commit c2f6eb8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
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

0 comments on commit c2f6eb8

Please sign in to comment.