Skip to content

Commit 1a08646

Browse files
authored
Stop using InterfaceElementImpl2 (#4041)
This simplifies the code and reduces use of private API.
1 parent 38b7d2e commit 1a08646

File tree

3 files changed

+4
-8
lines changed

3 files changed

+4
-8
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
## 8.3.4-wip
22
* The URL for category pages now uses _category name_ instead of
33
_category `displayName`_.
4+
* Require analyzer 7.4.4 APIs.
45

56
## 8.3.3
67

lib/src/model/extension.dart

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,6 @@
55
import 'package:analyzer/dart/element/element2.dart';
66
import 'package:analyzer/dart/element/nullability_suffix.dart';
77
import 'package:analyzer/dart/element/type.dart';
8-
// ignore: implementation_imports
9-
import 'package:analyzer/src/dart/element/element.dart';
10-
// ignore: implementation_imports
11-
import 'package:analyzer/src/dart/element/type_system.dart';
128
import 'package:dartdoc/src/element_type.dart';
139
import 'package:dartdoc/src/model/comment_referable.dart';
1410
import 'package:dartdoc/src/model/kind.dart';
@@ -52,9 +48,8 @@ class Extension extends Container {
5248
extendedType = library.element.typeSystem.promoteToNonNull(extendedType);
5349
var otherType = container.modelType.type;
5450
if (otherType is InterfaceType) {
55-
otherType = (library.element.typeSystem as TypeSystemImpl)
56-
.instantiateInterfaceToBounds2(
57-
element: otherType.element3 as InterfaceElementImpl2,
51+
otherType = library.element.typeSystem.instantiateInterfaceToBounds2(
52+
element: otherType.element3,
5853
nullabilitySuffix: NullabilitySuffix.none,
5954
);
6055

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ environment:
77
sdk: ^3.6.0
88

99
dependencies:
10-
analyzer: ^7.3.0
10+
analyzer: ^7.4.4
1111
args: ^2.4.1
1212
collection: ^1.17.0
1313
crypto: ^3.0.3

0 commit comments

Comments
 (0)