Skip to content

Commit

Permalink
Do not rely on the PackageGraph.objectClass late field
Browse files Browse the repository at this point in the history
  • Loading branch information
srawlins committed Dec 30, 2024
1 parent c8be845 commit ca38940
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
6 changes: 2 additions & 4 deletions lib/src/model/mixin.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,8 @@ class Mixin extends InheritingContainer {
final MixinElement element;

late final List<ParameterizedElementType> superclassConstraints = [
...element.superclassConstraints
.map((InterfaceType i) =>
getTypeFor(i, library) as ParameterizedElementType)
.where((t) => t.modelElement != packageGraph.objectClass)
...element.superclassConstraints.where((e) => !e.isDartCoreObject).map(
(InterfaceType i) => getTypeFor(i, library) as ParameterizedElementType)
];

@override
Expand Down
1 change: 1 addition & 0 deletions lib/src/model/package_graph.dart
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@ class PackageGraph with CommentReferable, Nameable {
final Map<Element, ModelNode> _modelNodes = {};

/// The Object class declared in the Dart SDK's 'dart:core' library.
// TODO(srawlins): I think nothing depends on this any longer; remove.
late InheritingContainer objectClass;

/// Populate's [_modelNodes] with elements in [resolvedLibrary].
Expand Down

0 comments on commit ca38940

Please sign in to comment.