Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(330)

Unified Diff: pkg/analyzer/lib/dart/element/element.dart

Issue 1977413002: Improve type information and minor clean up (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/analyzer/lib/dart/ast/ast.dart ('k') | pkg/analyzer/lib/source/config.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
}
« no previous file with comments | « pkg/analyzer/lib/dart/ast/ast.dart ('k') | pkg/analyzer/lib/source/config.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698