| Index: pkg/analyzer/lib/dart/element/element.dart
|
| diff --git a/pkg/analyzer/lib/dart/element/element.dart b/pkg/analyzer/lib/dart/element/element.dart
|
| index e0a91d93d03bf5e1b094317c178969e1ef2841b7..e7091abbee52977712aace580768e4fcb5054cd6 100644
|
| --- a/pkg/analyzer/lib/dart/element/element.dart
|
| +++ b/pkg/analyzer/lib/dart/element/element.dart
|
| @@ -757,7 +757,8 @@ abstract class Element implements AnalysisTarget {
|
| * [predicate] returns `true`, or `null` if there is no such ancestor. Note
|
| * that this element will never be returned.
|
| */
|
| - Element getAncestor(Predicate<Element> predicate);
|
| + Element/*=E*/ getAncestor/*<E extends Element >*/(
|
| + Predicate<Element> predicate);
|
|
|
| /**
|
| * Return a display name for the given element that includes the path to the
|
| @@ -806,13 +807,6 @@ abstract class ElementAnnotation implements ConstantEvaluationTarget {
|
| DartObject get constantValue;
|
|
|
| /**
|
| - * Return a representation of the value of this annotation, forcing the value
|
| - * to be computed if it had not previously been computed, or `null` if the
|
| - * value of this annotation could not be computed because of errors.
|
| - */
|
| - DartObject computeConstantValue();
|
| -
|
| - /**
|
| * Return the element representing the field, variable, or const constructor
|
| * being used as an annotation.
|
| */
|
| @@ -859,6 +853,13 @@ abstract class ElementAnnotation implements ConstantEvaluationTarget {
|
| * required.
|
| */
|
| bool get isRequired;
|
| +
|
| + /**
|
| + * Return a representation of the value of this annotation, forcing the value
|
| + * to be computed if it had not previously been computed, or `null` if the
|
| + * value of this annotation could not be computed because of errors.
|
| + */
|
| + DartObject computeConstantValue();
|
| }
|
|
|
| /**
|
| @@ -1938,14 +1939,6 @@ abstract class VariableElement implements Element, ConstantEvaluationTarget {
|
| DartObject get constantValue;
|
|
|
| /**
|
| - * Return a representation of the value of this variable, forcing the value
|
| - * to be computed if it had not previously been computed, or `null` if either
|
| - * this variable was not declared with the 'const' modifier or if the value of
|
| - * this variable could not be computed because of errors.
|
| - */
|
| - DartObject computeConstantValue();
|
| -
|
| - /**
|
| * Return `true` if this variable element did not have an explicit type
|
| * specified for it.
|
| */
|
| @@ -2016,4 +2009,12 @@ abstract class VariableElement implements Element, ConstantEvaluationTarget {
|
| * 'var').
|
| */
|
| DartType get type;
|
| +
|
| + /**
|
| + * Return a representation of the value of this variable, forcing the value
|
| + * to be computed if it had not previously been computed, or `null` if either
|
| + * this variable was not declared with the 'const' modifier or if the value of
|
| + * this variable could not be computed because of errors.
|
| + */
|
| + DartObject computeConstantValue();
|
| }
|
|
|