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

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

Issue 1717243003: cleanup to InvocationExpression AST declaration (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 10 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/analyzer/lib/src/dart/ast/ast.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/dart/ast/ast.dart
diff --git a/pkg/analyzer/lib/dart/ast/ast.dart b/pkg/analyzer/lib/dart/ast/ast.dart
index dbc0a0da926e253abc45b4af95d826785fb20fc4..547094b28cfc1c2b2ca3ccadb1067a3abd449ac9 100644
--- a/pkg/analyzer/lib/dart/ast/ast.dart
+++ b/pkg/analyzer/lib/dart/ast/ast.dart
@@ -4974,6 +4974,25 @@ abstract class InterpolationString extends InterpolationElement {
*/
abstract class InvocationExpression extends Expression {
/**
+ * Return the list of arguments to the method.
+ */
+ ArgumentList get argumentList;
+
+ /**
+ * The expression that identifies the function or method being invoked.
+ * For example:
+ *
+ * (o.m)<TArgs>(args); // target will be `o.m`
+ * o.m<TArgs>(args); // target will be `m`
+ *
+ * In either case, the [function.staticType] will be the
+ * [staticInvokeType] before applying type arguments `TArgs`. Similarly,
+ * [function.propagatedType] will be the [propagatedInvokeType]
+ * before applying type arguments `TArgs`.
+ */
+ Expression get function;
+
+ /**
* Return the function type of the invocation based on the propagated type
* information, or `null` if the AST structure has not been resolved, or if
* the invoke could not be resolved.
@@ -4982,7 +5001,13 @@ abstract class InvocationExpression extends Expression {
* [InterfaceType] with a `call` method, `dynamic`, `Function`, or a `@proxy`
* interface type that implements `Function`.
*/
- DartType propagatedInvokeType;
+ DartType get propagatedInvokeType;
+
+ /**
+ * Sets the function type of the invocation based on the propagated type
+ * information.
+ */
+ void set propagatedInvokeType(DartType value);
Brian Wilkerson 2016/02/23 00:11:08 Do we need the setters on the interface, or can we
Jennifer Messerly 2016/02/23 00:49:52 Currently, yes. Otherwise, the only way to set it
/**
* Return the function type of the invocation based on the static type
@@ -4993,26 +5018,13 @@ abstract class InvocationExpression extends Expression {
* [InterfaceType] with a `call` method, `dynamic`, `Function`, or a `@proxy`
* interface type that implements `Function`.
*/
- DartType staticInvokeType;
-
- /**
- * Return the list of arguments to the method.
- */
- ArgumentList get argumentList;
+ DartType get staticInvokeType;
/**
- * The expression that identifies the function or method being invoked.
- * For example:
- *
- * (o.m)<TArgs>(args); // target will be `o.m`
- * o.m<TArgs>(args); // target will be `m`
- *
- * In either case, the [function.staticType] will be the
- * [staticInvokeType] before applying type arguments `TArgs`. Similarly,
- * [function.propagatedType] will be the [propagatedInvokeType]
- * before applying type arguments `TArgs`.
+ * Sets the function type of the invocation based on the static type
+ * information.
*/
- Expression get function;
+ void set staticInvokeType(DartType value);
/**
* Return the type arguments to be applied to the method being invoked, or
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/dart/ast/ast.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698