Index: pkg/compiler/lib/src/elements/elements.dart |
diff --git a/pkg/compiler/lib/src/elements/elements.dart b/pkg/compiler/lib/src/elements/elements.dart |
index c2e809f58432917b3da5fd940337f90a9c666ede..4a7b3addc48d56824fc304be112a42b72077e671 100644 |
--- a/pkg/compiler/lib/src/elements/elements.dart |
+++ b/pkg/compiler/lib/src/elements/elements.dart |
@@ -189,16 +189,6 @@ abstract class Element implements Entity { |
Element get enclosingElement; |
Link<MetadataAnnotation> get metadata; |
- /// Do not use [computeType] outside of the resolver; instead retrieve the |
- /// type from the corresponding field: |
- /// - `type` for fields, variables, type variable, and function elements. |
- /// - `thisType` or `rawType` for [TypeDeclarationElement]s (classes and |
- /// typedefs), depending on the use case. |
- /// Trying to access a type that has not been computed in resolution is an |
- /// error and calling [computeType] covers that error. |
- /// This method will go away! |
- @deprecated DartType computeType(Compiler compiler); |
- |
/// `true` if this element is a library. |
bool get isLibrary; |
@@ -1090,8 +1080,8 @@ abstract class InitializingFormalElement extends ParameterElement { |
* field named "x", a getter named "x", and a setter named "x=". |
*/ |
abstract class AbstractFieldElement extends Element { |
- FunctionElement get getter; |
- FunctionElement get setter; |
+ GetterElement get getter; |
+ SetterElement get setter; |
} |
abstract class FunctionSignature { |
@@ -1292,6 +1282,15 @@ abstract class ConstructorBodyElement extends MethodElement { |
/// [TypeDeclarationElement] defines the common interface for class/interface |
/// declarations and typedefs. |
abstract class TypeDeclarationElement extends Element implements AstElement { |
+ /// Do not use [computeType] outside of the resolver; instead retrieve the |
+ /// type from the [thisType] or [rawType], depending on the use case. |
+ /// |
+ /// Trying to access a type that has not been computed in resolution is an |
+ /// error and calling [computeType] covers that error. |
+ /// This method will go away! |
+ @deprecated |
+ GenericType computeType(Compiler compiler); |
+ |
/** |
* The `this type` for this type declaration. |
* |
@@ -1524,6 +1523,15 @@ abstract class MetadataAnnotation implements Spannable { |
/// An [Element] that has a type. |
abstract class TypedElement extends Element { |
+ /// Do not use [computeType] outside of the resolver; instead retrieve the |
+ /// type from [type] property. |
+ /// |
+ /// Trying to access a type that has not been computed in resolution is an |
+ /// error and calling [computeType] covers that error. |
+ /// This method will go away! |
+ @deprecated |
+ DartType computeType(Compiler compiler); |
+ |
DartType get type; |
} |