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

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

Issue 1925173002: Add a (public) utility method to clean-up code (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
« no previous file with comments | « no previous file | pkg/analysis_server/lib/src/services/correction/util.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/fix_internal.dart
diff --git a/pkg/analysis_server/lib/src/services/correction/fix_internal.dart b/pkg/analysis_server/lib/src/services/correction/fix_internal.dart
index b1dd15b34945ce0538407f3997c26a02d23852cf..a00e980d332a239b70224e93c91cfff50f0abb4c 100644
--- a/pkg/analysis_server/lib/src/services/correction/fix_internal.dart
+++ b/pkg/analysis_server/lib/src/services/correction/fix_internal.dart
@@ -2145,10 +2145,7 @@ class FixProcessor {
if (n is MethodInvocation &&
n.offset == errorOffset &&
n.length == errorLength) {
- Expression target = n.target;
- while (target is ParenthesizedExpression) {
- target = (target as ParenthesizedExpression).expression;
- }
+ Expression target = n.target.unParenthesized;
// replace "/" with "~/"
BinaryExpression binary = target as BinaryExpression;
_addReplaceEdit(rf.rangeToken(binary.operator), '~/');
« no previous file with comments | « no previous file | pkg/analysis_server/lib/src/services/correction/util.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698