77import 'package:_fe_analyzer_shared/src/type_inference/type_analyzer_operations.dart' ;
88import 'package:analyzer/dart/analysis/features.dart' ;
99import 'package:analyzer/dart/element/element.dart' ;
10+ import 'package:analyzer/dart/element/element2.dart' ;
1011import 'package:analyzer/dart/element/nullability_suffix.dart' ;
1112import 'package:analyzer/dart/element/type.dart' ;
1213import 'package:analyzer/source/line_info.dart' ;
@@ -20,6 +21,7 @@ import 'package:analyzer/src/dart/element/type_system.dart';
2021import 'package:analyzer/src/generated/engine.dart' ;
2122import 'package:analyzer/src/generated/utilities_dart.dart' ;
2223import 'package:analyzer/src/summary2/reference.dart' ;
24+ import 'package:analyzer/src/utilities/extensions/element.dart' ;
2325import 'package:test/test.dart' ;
2426
2527mixin ElementsTypesMixin {
@@ -506,6 +508,16 @@ mixin ElementsTypesMixin {
506508 );
507509 }
508510
511+ TypeParameterTypeImpl promotedTypeParameterTypeNone2 (
512+ TypeParameterElement2 element,
513+ DartType promotedBound,
514+ ) {
515+ return promotedTypeParameterTypeNone (
516+ element.asElement,
517+ promotedBound,
518+ );
519+ }
520+
509521 TypeParameterTypeImpl promotedTypeParameterTypeQuestion (
510522 TypeParameterElement element,
511523 DartType promotedBound,
@@ -608,6 +620,11 @@ mixin ElementsTypesMixin {
608620 return element;
609621 }
610622
623+ TypeParameterElement2 typeParameter2 (String name,
624+ {DartType ? bound, Variance ? variance}) {
625+ return typeParameter (name, bound: bound, variance: variance).asElement2;
626+ }
627+
611628 TypeParameterTypeImpl typeParameterType (
612629 TypeParameterElement element, {
613630 required NullabilitySuffix nullabilitySuffix,
@@ -631,6 +648,16 @@ mixin ElementsTypesMixin {
631648 );
632649 }
633650
651+ TypeParameterTypeImpl typeParameterTypeNone2 (
652+ TypeParameterElement2 element, {
653+ DartType ? promotedBound,
654+ }) {
655+ return typeParameterTypeNone (
656+ element.asElement,
657+ promotedBound: promotedBound,
658+ );
659+ }
660+
634661 TypeParameterTypeImpl typeParameterTypeQuestion (
635662 TypeParameterElement element, {
636663 DartType ? promotedBound,
@@ -641,6 +668,16 @@ mixin ElementsTypesMixin {
641668 promotedBound: promotedBound,
642669 );
643670 }
671+
672+ TypeParameterTypeImpl typeParameterTypeQuestion2 (
673+ TypeParameterElement2 element, {
674+ DartType ? promotedBound,
675+ }) {
676+ return typeParameterTypeQuestion (
677+ element.asElement,
678+ promotedBound: promotedBound,
679+ );
680+ }
644681}
645682
646683class _MockSource implements Source {
0 commit comments