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

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

Issue 1052243003: Issue 23081. Fix for inlining into IndexExpression index. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 9 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/refactoring/inline_local_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/util.dart
diff --git a/pkg/analysis_server/lib/src/services/correction/util.dart b/pkg/analysis_server/lib/src/services/correction/util.dart
index c40907dbf2d3753af8eda528a26adbdd39ede252..ba7a8588ce95029e94de9330069f3379ebd1d4ca 100644
--- a/pkg/analysis_server/lib/src/services/correction/util.dart
+++ b/pkg/analysis_server/lib/src/services/correction/util.dart
@@ -261,6 +261,9 @@ int getExpressionParentPrecedence(AstNode node) {
if (parent is ParenthesizedExpression) {
return 0;
}
+ if (parent is IndexExpression && parent.index == node) {
+ return 0;
+ }
return getExpressionPrecedence(parent);
}
« no previous file with comments | « no previous file | pkg/analysis_server/test/services/refactoring/inline_local_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698