@@ -3373,6 +3373,12 @@ abstract class ElementOrMember {
33733373 /// The kind of element that this is.
33743374 ElementKind get kind;
33753375
3376+ /// All of the metadata associated with this element.
3377+ ///
3378+ /// The array will be empty if the element does not have any metadata or if
3379+ /// the library containing this element has not yet been resolved.
3380+ List <ElementAnnotation > get metadata;
3381+
33763382 /// The name of this element, or `null` if this element does not have a name.
33773383 String ? get name;
33783384
@@ -5572,9 +5578,7 @@ abstract class InstanceElementImpl2 extends ElementImpl2
55725578 @override
55735579 List <FieldElementImpl2 > get fields2 {
55745580 _readMembers ();
5575- return firstFragment.fields
5576- .map ((e) => e.asElement2 as FieldElementImpl2 )
5577- .toList ();
5581+ return firstFragment.fields.map ((e) => e.asElement2).toList ();
55785582 }
55795583
55805584 @override
@@ -11051,15 +11055,51 @@ abstract class VariableElementImpl2 extends ElementImpl2
1105111055/// Common base class for all analyzer-internal classes that implement
1105211056/// `VariableElement` .
1105311057abstract class VariableElementOrMember
11054- implements
11055- ElementOrMember ,
11056- // ignore:deprecated_member_use_from_same_package,analyzer_use_new_elements
11057- VariableElement {
11058+ implements ElementOrMember , ConstantEvaluationTarget {
1105811059 @override
1105911060 VariableElementImpl get declaration;
1106011061
11062+ /// Whether the variable element did not have an explicit type specified
11063+ /// for it.
11064+ bool get hasImplicitType;
11065+
11066+ /// Whether the variable was declared with the 'const' modifier.
11067+ bool get isConst;
11068+
11069+ /// Whether the variable was declared with the 'final' modifier.
11070+ ///
11071+ /// Variables that are declared with the 'const' modifier will return `false`
11072+ /// even though they are implicitly final.
11073+ bool get isFinal;
11074+
11075+ /// Whether the variable uses late evaluation semantics.
11076+ ///
11077+ /// This will always return `false` unless the experiment 'non-nullable' is
11078+ /// enabled.
11079+ bool get isLate;
11080+
11081+ /// Whether the element is a static variable, as per section 8 of the Dart
11082+ /// Language Specification:
11083+ ///
11084+ /// > A static variable is a variable that is not associated with a particular
11085+ /// > instance, but rather with an entire library or class. Static variables
11086+ /// > include library variables and class variables. Class variables are
11087+ /// > variables whose declaration is immediately nested inside a class
11088+ /// > declaration and includes the modifier static. A library variable is
11089+ /// > implicitly static.
11090+ bool get isStatic;
11091+
1106111092 @override
11093+ String get name;
11094+
11095+ /// The declared type of this variable.
1106211096 TypeImpl get type;
11097+
11098+ /// Returns a representation of the value of this variable, forcing the value
11099+ /// to be computed if it had not previously been computed, or `null` if either
11100+ /// this variable was not declared with the 'const' modifier or if the value
11101+ /// of this variable could not be computed because of errors.
11102+ DartObject ? computeConstantValue ();
1106311103}
1106411104
1106511105mixin WrappedElementMixin implements ElementImpl2 {
0 commit comments