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

Unified Diff: pkg/compiler/lib/src/elements/elements.dart

Issue 1172693003: Move computeType to TypedElement and TypeDeclarationElement. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 6 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 | « no previous file | pkg/compiler/lib/src/elements/modelx.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
}
« no previous file with comments | « no previous file | pkg/compiler/lib/src/elements/modelx.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698