Skip to content

Commit 96f18b4

Browse files
authored
Elements. Migrate lib/src/model/extension.dart (#3994)
1 parent b8c3f02 commit 96f18b4

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

lib/src/model/extension.dart

+6-5
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
// for details. All rights reserved. Use of this source code is governed by a
33
// BSD-style license that can be found in the LICENSE file.
44

5-
// ignore_for_file: analyzer_use_new_elements
6-
75
import 'package:analyzer/dart/element/element2.dart';
86
import 'package:analyzer/dart/element/nullability_suffix.dart';
97
import 'package:analyzer/dart/element/type.dart';
108
// ignore: implementation_imports
11-
import 'package:analyzer/src/utilities/extensions/element.dart';
9+
import 'package:analyzer/src/dart/element/element.dart';
10+
// ignore: implementation_imports
11+
import 'package:analyzer/src/dart/element/type_system.dart';
1212
import 'package:dartdoc/src/element_type.dart';
1313
import 'package:dartdoc/src/model/comment_referable.dart';
1414
import 'package:dartdoc/src/model/kind.dart';
@@ -52,8 +52,9 @@ class Extension extends Container {
5252
extendedType = library.element2.typeSystem.promoteToNonNull(extendedType);
5353
var otherType = container.modelType.type;
5454
if (otherType is InterfaceType) {
55-
otherType = library.element2.typeSystem.instantiateInterfaceToBounds(
56-
element: otherType.element3.asElement,
55+
otherType = (library.element2.typeSystem as TypeSystemImpl)
56+
.instantiateInterfaceToBounds2(
57+
element: otherType.element3 as InterfaceElementImpl2,
5758
nullabilitySuffix: NullabilitySuffix.none,
5859
);
5960

0 commit comments

Comments
 (0)