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-
7- import 'package:analyzer/dart/element/element.dart' ;
5+ import 'package:analyzer/dart/element/element2.dart' ;
86import 'package:analyzer/dart/element/type.dart' ;
97import 'package:analyzer/src/dart/element/type.dart' ;
108import 'package:test/test.dart' ;
@@ -39,15 +37,15 @@ class RuntimeTypeEqualityTypeTest extends AbstractTypeSystemTest
3937
4038 test_functionType_parameters () {
4139 void check (
42- ParameterElement T1_parameter ,
43- ParameterElement T2_parameter ,
40+ FormalParameterElement T1_parameter ,
41+ FormalParameterElement T2_parameter ,
4442 bool expected,
4543 ) {
46- var T1 = functionTypeNone (
44+ var T1 = functionTypeNone2 (
4745 returnType: voidNone,
4846 parameters: [T1_parameter ],
4947 );
50- var T2 = functionTypeNone (
48+ var T2 = functionTypeNone2 (
5149 returnType: voidNone,
5250 parameters: [T2_parameter ],
5351 );
@@ -61,8 +59,8 @@ class RuntimeTypeEqualityTypeTest extends AbstractTypeSystemTest
6159 bool expected,
6260 ) {
6361 check (
64- requiredParameter (type: T1_type ),
65- requiredParameter (type: T2_type ),
62+ requiredParameter2 (type: T1_type ),
63+ requiredParameter2 (type: T2_type ),
6664 expected,
6765 );
6866 }
@@ -74,78 +72,78 @@ class RuntimeTypeEqualityTypeTest extends AbstractTypeSystemTest
7472 checkRequiredParameter (intQuestion, intQuestion, true );
7573
7674 check (
77- requiredParameter (type: intNone, name: 'a' ),
78- requiredParameter (type: intNone, name: 'b' ),
75+ requiredParameter2 (type: intNone, name: 'a' ),
76+ requiredParameter2 (type: intNone, name: 'b' ),
7977 true ,
8078 );
8179
8280 check (
83- requiredParameter (type: intNone),
84- positionalParameter (type: intNone),
81+ requiredParameter2 (type: intNone),
82+ positionalParameter2 (type: intNone),
8583 false ,
8684 );
8785
8886 check (
89- requiredParameter (type: intNone),
90- namedParameter (type: intNone, name: 'a' ),
87+ requiredParameter2 (type: intNone),
88+ namedParameter2 (type: intNone, name: 'a' ),
9189 false ,
9290 );
9391
9492 check (
95- requiredParameter (type: intNone),
96- namedRequiredParameter (type: intNone, name: 'a' ),
93+ requiredParameter2 (type: intNone),
94+ namedRequiredParameter2 (type: intNone, name: 'a' ),
9795 false ,
9896 );
9997 }
10098
10199 {
102100 check (
103- namedParameter (type: intNone, name: 'a' ),
104- namedParameter (type: intNone, name: 'a' ),
101+ namedParameter2 (type: intNone, name: 'a' ),
102+ namedParameter2 (type: intNone, name: 'a' ),
105103 true ,
106104 );
107105
108106 check (
109- namedParameter (type: intNone, name: 'a' ),
110- namedParameter (type: boolNone, name: 'a' ),
107+ namedParameter2 (type: intNone, name: 'a' ),
108+ namedParameter2 (type: boolNone, name: 'a' ),
111109 false ,
112110 );
113111
114112 check (
115- namedParameter (type: intNone, name: 'a' ),
116- namedParameter (type: intNone, name: 'b' ),
113+ namedParameter2 (type: intNone, name: 'a' ),
114+ namedParameter2 (type: intNone, name: 'b' ),
117115 false ,
118116 );
119117
120118 check (
121- namedParameter (type: intNone, name: 'a' ),
122- namedRequiredParameter (type: intNone, name: 'a' ),
119+ namedParameter2 (type: intNone, name: 'a' ),
120+ namedRequiredParameter2 (type: intNone, name: 'a' ),
123121 false ,
124122 );
125123 }
126124
127125 {
128126 check (
129- namedRequiredParameter (type: intNone, name: 'a' ),
130- namedRequiredParameter (type: intNone, name: 'a' ),
127+ namedRequiredParameter2 (type: intNone, name: 'a' ),
128+ namedRequiredParameter2 (type: intNone, name: 'a' ),
131129 true ,
132130 );
133131
134132 check (
135- namedRequiredParameter (type: intNone, name: 'a' ),
136- namedRequiredParameter (type: boolNone, name: 'a' ),
133+ namedRequiredParameter2 (type: intNone, name: 'a' ),
134+ namedRequiredParameter2 (type: boolNone, name: 'a' ),
137135 false ,
138136 );
139137
140138 check (
141- namedRequiredParameter (type: intNone, name: 'a' ),
142- namedRequiredParameter (type: intNone, name: 'b' ),
139+ namedRequiredParameter2 (type: intNone, name: 'a' ),
140+ namedRequiredParameter2 (type: intNone, name: 'b' ),
143141 false ,
144142 );
145143
146144 check (
147- namedRequiredParameter (type: intNone, name: 'a' ),
148- namedParameter (type: intNone, name: 'a' ),
145+ namedRequiredParameter2 (type: intNone, name: 'a' ),
146+ namedParameter2 (type: intNone, name: 'a' ),
149147 false ,
150148 );
151149 }
0 commit comments