From 24c9e41ddc2c7dc01130b868ec8ef665f3f3042e Mon Sep 17 00:00:00 2001 From: Sam Rawlins Date: Mon, 28 Apr 2025 08:55:07 -0700 Subject: [PATCH] Stop using InterfaceElementImpl2 --- CHANGELOG.md | 1 + lib/src/model/extension.dart | 9 ++------- pubspec.yaml | 2 +- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d7dbe2aa8b..7596f8ba37 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ ## 8.3.4-wip * The URL for category pages now uses _category name_ instead of _category `displayName`_. +* Require analyzer 7.4.4 APIs. ## 8.3.3 diff --git a/lib/src/model/extension.dart b/lib/src/model/extension.dart index 7edce77683..df3207af5b 100644 --- a/lib/src/model/extension.dart +++ b/lib/src/model/extension.dart @@ -5,10 +5,6 @@ import 'package:analyzer/dart/element/element2.dart'; import 'package:analyzer/dart/element/nullability_suffix.dart'; import 'package:analyzer/dart/element/type.dart'; -// ignore: implementation_imports -import 'package:analyzer/src/dart/element/element.dart'; -// ignore: implementation_imports -import 'package:analyzer/src/dart/element/type_system.dart'; import 'package:dartdoc/src/element_type.dart'; import 'package:dartdoc/src/model/comment_referable.dart'; import 'package:dartdoc/src/model/kind.dart'; @@ -52,9 +48,8 @@ class Extension extends Container { extendedType = library.element.typeSystem.promoteToNonNull(extendedType); var otherType = container.modelType.type; if (otherType is InterfaceType) { - otherType = (library.element.typeSystem as TypeSystemImpl) - .instantiateInterfaceToBounds2( - element: otherType.element3 as InterfaceElementImpl2, + otherType = library.element.typeSystem.instantiateInterfaceToBounds2( + element: otherType.element3, nullabilitySuffix: NullabilitySuffix.none, ); diff --git a/pubspec.yaml b/pubspec.yaml index 450b9b5696..2f9424f026 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -7,7 +7,7 @@ environment: sdk: ^3.6.0 dependencies: - analyzer: ^7.3.0 + analyzer: ^7.4.4 args: ^2.4.1 collection: ^1.17.0 crypto: ^3.0.3