| 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 a683638047feb50c7eb7e1cbe572893e2ee39f50..13714aee2eb9c7cf9d70a69405ba21a4104ca443 100644
|
| --- a/pkg/analysis_server/lib/src/services/correction/assist_internal.dart
|
| +++ b/pkg/analysis_server/lib/src/services/correction/assist_internal.dart
|
| @@ -1092,17 +1092,15 @@ class AssistProcessor {
|
| Block targetBlock;
|
| {
|
| Statement statement = node.getAncestor((n) => n is Statement);
|
| - prefix = utils.getNodePrefix(statement);
|
| if (statement is IfStatement && statement.thenStatement is Block) {
|
| targetBlock = statement.thenStatement;
|
| - }
|
| - if (statement is WhileStatement && statement.body is Block) {
|
| + } else if (statement is WhileStatement && statement.body is Block) {
|
| targetBlock = statement.body;
|
| + } else {
|
| + _coverageMarker();
|
| + return;
|
| }
|
| - }
|
| - if (targetBlock == null) {
|
| - _coverageMarker();
|
| - return;
|
| + prefix = utils.getNodePrefix(statement);
|
| }
|
| // prepare location
|
| int offset;
|
|
|