@@ -40,10 +40,6 @@ class DynamicTypeImpl extends TypeImpl
4040 /// Prevent the creation of instances of this class.
4141 DynamicTypeImpl ._();
4242
43- @Deprecated ('Use element2 instead' )
44- @override
45- DynamicElementImpl get element => DynamicElementImpl .instance;
46-
4743 @override
4844 DynamicElementImpl2 get element3 => DynamicElementImpl2 .instance;
4945
@@ -194,10 +190,6 @@ class FunctionTypeImpl extends TypeImpl
194190 super .alias,
195191 });
196192
197- @Deprecated ('Use element2 instead' )
198- @override
199- Null get element => null ;
200-
201193 @override
202194 Null get element3 => null ;
203195
@@ -666,10 +658,6 @@ class InterfaceTypeImpl extends TypeImpl implements InterfaceType {
666658 }).toFixedList ();
667659 }
668660
669- @Deprecated ('Use element3 instead' )
670- @override
671- InterfaceElementImpl get element => element3.asElement;
672-
673661 @override
674662 List <GetterElement2OrMember > get getters {
675663 return _getters ?? = element3.getters2.map ((e) {
@@ -793,7 +781,7 @@ class InterfaceTypeImpl extends TypeImpl implements InterfaceType {
793781
794782 @Deprecated ('Check element, or use getDisplayString()' )
795783 @override
796- String get name => element.name ;
784+ String get name => element3.name3 ! ;
797785
798786 /// The instantiated representation type, if [element3] is an extension type.
799787 TypeImpl ? get representationType {
@@ -873,23 +861,6 @@ class InterfaceTypeImpl extends TypeImpl implements InterfaceType {
873861 builder.writeInterfaceType (this );
874862 }
875863
876- @Deprecated ('Use asInstanceOf2() instead' )
877- @override
878- InterfaceTypeImpl ? asInstanceOf (InterfaceElement targetElement) {
879- if (element == targetElement) {
880- return this ;
881- }
882-
883- for (var rawInterface in element.allSupertypes) {
884- if (rawInterface.element == targetElement) {
885- var substitution = Substitution .fromInterfaceType (this );
886- return substitution.mapInterfaceType (rawInterface);
887- }
888- }
889-
890- return null ;
891- }
892-
893864 @override
894865 InterfaceTypeImpl ? asInstanceOf2 (InterfaceElement2 targetElement) {
895866 if (element3 == targetElement) {
@@ -1182,10 +1153,6 @@ class InvalidTypeImpl extends TypeImpl
11821153 /// Prevent the creation of instances of this class.
11831154 InvalidTypeImpl ._();
11841155
1185- @Deprecated ('Use element2 instead' )
1186- @override
1187- Null get element => null ;
1188-
11891156 @override
11901157 Null get element3 => null ;
11911158
@@ -1235,9 +1202,6 @@ class NeverTypeImpl extends TypeImpl implements NeverType {
12351202 /// The unique instance of this class, non-nullable.
12361203 static final NeverTypeImpl instance = NeverTypeImpl ._(NullabilitySuffix .none);
12371204
1238- @override
1239- final NeverElementImpl element = NeverElementImpl .instance;
1240-
12411205 @override
12421206 final NeverElementImpl2 element3 = NeverElementImpl2 .instance;
12431207
@@ -1364,10 +1328,6 @@ class RecordTypeImpl extends TypeImpl implements RecordType, SharedRecordType {
13641328 );
13651329 }
13661330
1367- @Deprecated ('Use element2 instead' )
1368- @override
1369- Null get element => null ;
1370-
13711331 @override
13721332 Null get element3 => null ;
13731333
@@ -1524,10 +1484,6 @@ abstract class TypeImpl implements DartType, SharedType {
15241484 /// Initialize a newly created type.
15251485 const TypeImpl ({this .alias});
15261486
1527- @Deprecated ('Use element3 instead' )
1528- @override
1529- Element ? get element => element3? .asElement;
1530-
15311487 @override
15321488 TypeImpl get extensionTypeErasure {
15331489 return const ExtensionTypeErasure ().perform (this );
@@ -1702,14 +1658,6 @@ class TypeParameterTypeImpl extends TypeImpl implements TypeParameterType {
17021658 TypeImpl get bound =>
17031659 promotedBound ?? element3.bound ?? DynamicTypeImpl .instance;
17041660
1705- @Deprecated ('Elements are equal when they are identical' )
1706- @override
1707- ElementLocation get definition => element.location;
1708-
1709- @Deprecated ('Use element3 instead' )
1710- @override
1711- TypeParameterElementImpl get element => element3.asElement;
1712-
17131661 @override
17141662 int get hashCode => element3.hashCode;
17151663
@@ -1737,7 +1685,7 @@ class TypeParameterTypeImpl extends TypeImpl implements TypeParameterType {
17371685
17381686 @Deprecated ('Check element, or use getDisplayString()' )
17391687 @override
1740- String get name => element.name ;
1688+ String get name => element3.name3 ! ;
17411689
17421690 TypeParameterTypeImpl get withoutPromotedBound {
17431691 return TypeParameterTypeImpl (
@@ -1791,12 +1739,6 @@ class TypeParameterTypeImpl extends TypeImpl implements TypeParameterType {
17911739 return bound.asInstanceOf2 (targetElement);
17921740 }
17931741
1794- @Deprecated ('Use referencesAny2() instead' )
1795- @override
1796- bool referencesAny (Set <TypeParameterElement > parameters) {
1797- return parameters.contains (element);
1798- }
1799-
18001742 @override
18011743 bool referencesAny2 (Set <TypeParameterElementImpl2 > parameters) {
18021744 return parameters.contains (element3);
@@ -1821,10 +1763,6 @@ class VoidTypeImpl extends TypeImpl implements VoidType, SharedVoidType {
18211763 /// Prevent the creation of instances of this class.
18221764 VoidTypeImpl ._();
18231765
1824- @Deprecated ('Use element2 instead' )
1825- @override
1826- Null get element => null ;
1827-
18281766 @override
18291767 Null get element3 => null ;
18301768
0 commit comments