| 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 fdec5b8227502858eae7329d78745326af8cf18e..d7a7bf57c616d62cd82d274971d40271ed18a6fe 100644
|
| --- a/pkg/analysis_server/lib/src/services/correction/util.dart
|
| +++ b/pkg/analysis_server/lib/src/services/correction/util.dart
|
| @@ -459,6 +459,21 @@ bool isNamedExpressionName(SimpleIdentifier node) {
|
| }
|
|
|
|
|
| +/**
|
| + * If the given [expression] is the `expression` property of a [NamedExpression]
|
| + * then returns this [NamedExpression]. Otherwise returns [expression].
|
| + */
|
| +Expression stepUpNamedExpression(Expression expression) {
|
| + if (expression != null) {
|
| + AstNode parent = expression.parent;
|
| + if (parent is NamedExpression && parent.expression == expression) {
|
| + return parent;
|
| + }
|
| + }
|
| + return expression;
|
| +}
|
| +
|
| +
|
| class CorrectionUtils {
|
| final CompilationUnit unit;
|
|
|
|
|