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

Unified Diff: pkg/analyzer/lib/src/summary/summarize_const_expr.dart

Issue 2013093002: Summarize references to closure parameters properly. (Closed) Base URL: git@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
Index: pkg/analyzer/lib/src/summary/summarize_const_expr.dart
diff --git a/pkg/analyzer/lib/src/summary/summarize_const_expr.dart b/pkg/analyzer/lib/src/summary/summarize_const_expr.dart
index f8f6aab2d4eb94ca2047d9a195cdd7141fc19022..8be5f212041ba4448f2995942f22994aef0115fc 100644
--- a/pkg/analyzer/lib/src/summary/summarize_const_expr.dart
+++ b/pkg/analyzer/lib/src/summary/summarize_const_expr.dart
@@ -102,10 +102,9 @@ abstract class AbstractConstExprSerializer {
final List<EntityRefBuilder> references = <EntityRefBuilder>[];
/**
- * Return `true` if a constructor initializer expression is being serialized
- * and the given [name] is a constructor parameter reference.
+ * Return `true` if the given [name] is a parameter reference.
*/
- bool isConstructorParameterName(String name);
+ bool isParameterName(String name);
/**
* Serialize the given [expr] expression into this serializer state.
@@ -267,9 +266,9 @@ abstract class AbstractConstExprSerializer {
} else if (expr is NullLiteral) {
operations.add(UnlinkedConstOperation.pushNull);
} else if (expr is Identifier) {
- if (expr is SimpleIdentifier && isConstructorParameterName(expr.name)) {
+ if (expr is SimpleIdentifier && isParameterName(expr.name)) {
strings.add(expr.name);
- operations.add(UnlinkedConstOperation.pushConstructorParameter);
+ operations.add(UnlinkedConstOperation.pushParameter);
} else {
references.add(serializeIdentifier(expr));
operations.add(UnlinkedConstOperation.pushReference);

Powered by Google App Engine
This is Rietveld 408576698