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

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

Issue 1609883002: Ignore 'expr is' outside of a statement. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 11 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 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;
« 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