Skip to content

Commit 1d23faf

Browse files
scheglovCommit Queue
authored andcommitted
Elements. Remove V1 FieldElement.
Change-Id: Ie5b1f35b1922f716c0d1a313f8105dd9a1f90bc2 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/423402 Reviewed-by: Brian Wilkerson <[email protected]> Commit-Queue: Konstantin Shcheglov <[email protected]>
1 parent 15e3485 commit 1d23faf

File tree

3 files changed

+9
-54
lines changed

3 files changed

+9
-54
lines changed

pkg/analyzer/api.txt

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3160,15 +3160,6 @@ package:analyzer/dart/element/element.dart:
31603160
isStatic (getter: bool)
31613161
isSynchronous (getter: bool)
31623162
name (getter: String)
3163-
FieldElement (class extends Object implements ClassMemberElement, PropertyInducingElement, deprecated):
3164-
new (constructor: FieldElement Function())
3165-
declaration (getter: FieldElement)
3166-
isAbstract (getter: bool)
3167-
isCovariant (getter: bool)
3168-
isEnumConstant (getter: bool)
3169-
isExternal (getter: bool)
3170-
isPromotable (getter: bool)
3171-
isStatic (getter: bool)
31723163
FunctionTypedElement (class extends Object implements TypeParameterizedElement, deprecated):
31733164
new (constructor: FunctionTypedElement Function())
31743165
parameters (getter: List<ParameterElement>)

pkg/analyzer/lib/dart/element/element.dart

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -862,41 +862,6 @@ abstract class ExecutableElement implements FunctionTypedElement {
862862
String get name;
863863
}
864864

865-
/// A field defined within a class.
866-
///
867-
/// Clients may not extend, implement or mix-in this class.
868-
@Deprecated('Use FieldElement2 instead')
869-
abstract class FieldElement
870-
implements ClassMemberElement, PropertyInducingElement {
871-
@override
872-
FieldElement get declaration;
873-
874-
/// Whether the field is abstract.
875-
///
876-
/// Executable fields are abstract if they are declared with the `abstract`
877-
/// keyword.
878-
bool get isAbstract;
879-
880-
/// Whether the field was explicitly marked as being covariant.
881-
bool get isCovariant;
882-
883-
/// Whether the element is an enum constant.
884-
bool get isEnumConstant;
885-
886-
/// Whether the field was explicitly marked as being external.
887-
bool get isExternal;
888-
889-
/// Whether the field can be type promoted.
890-
bool get isPromotable;
891-
892-
/// Whether the element is a static element.
893-
///
894-
/// A static element is an element that is not associated with a particular
895-
/// instance, but rather with an entire library or class.
896-
@override
897-
bool get isStatic;
898-
}
899-
900865
/// An element that has a [FunctionType] as its [type].
901866
///
902867
/// This also provides convenient access to the parameters and return type.

pkg/analyzer/lib/src/dart/element/element.dart

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4021,12 +4021,15 @@ class FieldElementImpl extends PropertyInducingElementImpl
40214021

40224022
set element(FieldElementImpl2 element) => _element = element;
40234023

4024-
@override
4024+
/// Whether the field is abstract.
4025+
///
4026+
/// Executable fields are abstract if they are declared with the `abstract`
4027+
/// keyword.
40254028
bool get isAbstract {
40264029
return hasModifier(Modifier.ABSTRACT);
40274030
}
40284031

4029-
@override
4032+
/// Whether the field was explicitly marked as being covariant.
40304033
bool get isCovariant {
40314034
return hasModifier(Modifier.COVARIANT);
40324035
}
@@ -4036,7 +4039,7 @@ class FieldElementImpl extends PropertyInducingElementImpl
40364039
setModifier(Modifier.COVARIANT, isCovariant);
40374040
}
40384041

4039-
@override
4042+
/// Whether the element is an enum constant.
40404043
bool get isEnumConstant {
40414044
return hasModifier(Modifier.ENUM_CONSTANT);
40424045
}
@@ -4045,12 +4048,12 @@ class FieldElementImpl extends PropertyInducingElementImpl
40454048
setModifier(Modifier.ENUM_CONSTANT, isEnumConstant);
40464049
}
40474050

4048-
@override
4051+
/// Whether the field was explicitly marked as being external.
40494052
bool get isExternal {
40504053
return hasModifier(Modifier.EXTERNAL);
40514054
}
40524055

4053-
@override
4056+
/// Whether the field can be type promoted.
40544057
bool get isPromotable {
40554058
return hasModifier(Modifier.PROMOTABLE);
40564059
}
@@ -4202,11 +4205,7 @@ class FieldElementImpl2 extends PropertyInducingElementImpl2
42024205

42034206
/// Common base class for all analyzer-internal classes that implement
42044207
/// `FieldElement`.
4205-
abstract class FieldElementOrMember
4206-
implements
4207-
PropertyInducingElementOrMember,
4208-
// ignore:deprecated_member_use_from_same_package,analyzer_use_new_elements
4209-
FieldElement {
4208+
abstract class FieldElementOrMember implements PropertyInducingElementOrMember {
42104209
@override
42114210
FieldElementImpl get declaration;
42124211

0 commit comments

Comments
 (0)