@@ -173,7 +173,7 @@ class DartObjectImpl implements DartObject, Constant {
173173 final InstanceState state;
174174
175175 @override
176- final VariableElementImpl ? variable2 ;
176+ final VariableElementImpl ? variable ;
177177
178178 /// Initialize a newly created object to have the given [type] and [state] .
179179 factory DartObjectImpl (
@@ -183,7 +183,7 @@ class DartObjectImpl implements DartObject, Constant {
183183 VariableElementImpl ? variable,
184184 }) {
185185 type = type.extensionTypeErasure;
186- return DartObjectImpl ._(typeSystem, type, state, variable2 : variable);
186+ return DartObjectImpl ._(typeSystem, type, state, variable : variable);
187187 }
188188
189189 /// Creates a duplicate instance of [other] , tied to [variable] .
@@ -238,7 +238,7 @@ class DartObjectImpl implements DartObject, Constant {
238238 }
239239
240240 /// Initialize a newly created object to have the given [type] and [state] .
241- DartObjectImpl ._(this ._typeSystem, this .type, this .state, {this .variable2 }) {
241+ DartObjectImpl ._(this ._typeSystem, this .type, this .state, {this .variable }) {
242242 if (state case GenericState state) {
243243 state._object = this ;
244244 }
@@ -284,6 +284,10 @@ class DartObjectImpl implements DartObject, Constant {
284284 @visibleForTesting
285285 List <DartType >? get typeArguments => (state as FunctionState ).typeArguments;
286286
287+ @override
288+ @Deprecated ('Use variable instead' )
289+ VariableElement ? get variable2 => variable;
290+
287291 @override
288292 bool operator == (Object other) {
289293 if (other is DartObjectImpl ) {
@@ -940,11 +944,17 @@ class DartObjectImpl implements DartObject, Constant {
940944 }
941945
942946 @override
943- ExecutableElement2OrMember ? toFunctionValue2 () {
947+ ExecutableElement2OrMember ? toFunctionValue () {
944948 var state = this .state;
945949 return state is FunctionState ? state.element : null ;
946950 }
947951
952+ @override
953+ @Deprecated ('Use toFunctionValue instead' )
954+ ExecutableElement ? toFunctionValue2 () {
955+ return toFunctionValue ();
956+ }
957+
948958 @override
949959 int ? toIntValue () {
950960 var state = this .state;
0 commit comments