Skip to content

Commit 54c8892

Browse files
committed
Elements. Migrate to Element2
1 parent b8c3f02 commit 54c8892

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

lib/src/model/extension.dart

Lines changed: 5 additions & 5 deletions
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,8 @@ 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).instantiateInterfaceToBounds2(
56+
element: otherType.element3 as InterfaceElementImpl2,
5757
nullabilitySuffix: NullabilitySuffix.none,
5858
);
5959

test/end2end/model_test.dart

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44

55
// ignore_for_file: non_constant_identifier_names
66

7-
// ignore_for_file: analyzer_use_new_elements
8-
97
import 'package:analyzer/dart/element/element2.dart';
108
import 'package:analyzer/dart/element/type.dart';
119
import 'package:analyzer/source/line_info.dart';

0 commit comments

Comments
 (0)