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

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

Issue 1915123008: Implements support for ignoring method type arguments in resolution. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 8 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
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 54ecf63a80f1e3ce3eb8a71d2d874d210fb67f8c..c86a22d22634a346f40d749bc4ae44a58cdf19a7 100644
--- a/pkg/compiler/lib/src/elements/elements.dart
+++ b/pkg/compiler/lib/src/elements/elements.dart
@@ -1100,6 +1100,7 @@ abstract class AbstractFieldElement extends Element {
abstract class FunctionSignature {
FunctionType get type;
+ List<DartType> get typeVariables;
List<FormalElement> get requiredParameters;
List<FormalElement> get optionalParameters;
@@ -1127,7 +1128,8 @@ abstract class FunctionElement extends Element
AstElement,
TypedElement,
FunctionTypedElement,
- ExecutableElement {
+ ExecutableElement,
+ GenericElement {
FunctionExpression get node;
FunctionElement get patch;
@@ -1135,7 +1137,7 @@ abstract class FunctionElement extends Element
bool get hasFunctionSignature;
- /// The parameters of this functions.
+ /// The parameters of this function.
List<ParameterElement> get parameters;
/// The type of this function.
@@ -1315,9 +1317,20 @@ abstract class ConstructorBodyElement extends MethodElement {
FunctionElement get constructor;
}
+/// [GenericElement] defines the common interface for generic functions and
+/// [TypeDeclarationElement].
+abstract class GenericElement extends Element implements AstElement {
+ /**
+ * The type variables declared on this declaration. The type variables are not
+ * available until the type of the element has been computed through
+ * [computeType].
+ */
+ List<DartType> get typeVariables;
+}
+
/// [TypeDeclarationElement] defines the common interface for class/interface
/// declarations and typedefs.
-abstract class TypeDeclarationElement extends Element implements AstElement {
+abstract class TypeDeclarationElement extends GenericElement {
/// The name of this type declaration, taking privacy into account.
Name get memberName;
@@ -1359,13 +1372,6 @@ abstract class TypeDeclarationElement extends Element implements AstElement {
*/
GenericType get rawType;
- /**
- * The type variables declared on this declaration. The type variables are not
- * available until the type of the element has been computed through
- * [computeType].
- */
- List<DartType> get typeVariables;
-
bool get isResolved;
void ensureResolved(Resolution resolution);
@@ -1562,8 +1568,9 @@ abstract class TypeVariableElement extends Element
@deprecated
get enclosingElement;
- /// The class or typedef on which this type variable is defined.
- TypeDeclarationElement get typeDeclaration;
+ /// The class, typedef, function, or method on which this type variable is
Johnni Winther 2016/04/29 07:21:06 or function typed parameter
eernst 2016/04/29 13:24:50 Done.
+ /// defined.
+ GenericElement get typeDeclaration;
/// The index of this type variable within its type declaration.
int get index;
@@ -1605,7 +1612,7 @@ abstract class TypedElement extends Element {
}
/// An [Element] that can define a function type.
-abstract class FunctionTypedElement extends Element {
+abstract class FunctionTypedElement extends Element implements GenericElement {
/// The function signature for the function type defined by this element,
/// if any.
FunctionSignature get functionSignature;

Powered by Google App Engine
This is Rietveld 408576698