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

Unified Diff: pkg/analysis_server/lib/src/services/correction/assist_internal.dart

Issue 943053005: Don't propose 'Assign to local variable' when in arguments list. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 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/analysis_server/test/services/correction/assist_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/lib/src/services/correction/assist_internal.dart
diff --git a/pkg/analysis_server/lib/src/services/correction/assist_internal.dart b/pkg/analysis_server/lib/src/services/correction/assist_internal.dart
index bb6726d1c2ae4eaabd16a35b88afcb3b86ae5a4e..376e4140cb4b7b9f5a07e82f20be4ac399386065 100644
--- a/pkg/analysis_server/lib/src/services/correction/assist_internal.dart
+++ b/pkg/analysis_server/lib/src/services/correction/assist_internal.dart
@@ -362,6 +362,11 @@ class AssistProcessor {
// prepare expression
Expression expression = expressionStatement.expression;
int offset = expression.offset;
+ // ignore if in arguments
+ if (node.getAncestor((node) => node is ArgumentList) != null) {
+ _coverageMarker();
+ return;
+ }
// ignore if already assignment
if (expression is AssignmentExpression) {
_coverageMarker();
« no previous file with comments | « no previous file | pkg/analysis_server/test/services/correction/assist_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698