Skip to content

Commit 2a69434

Browse files
DanTupCommit Queue
authored andcommitted
[analysis_server] Fix filtering of code actions to exclude mismatched kinds instead of throwing
No current tests hit this, but if you call verifyCodeActionLiteralEdits without a "title", you could trigger a failed expectation here that you should not - the mismatched actions should just be filtered out. Change-Id: I6962c9f99a7a3051afcf3f76ad90945cd1381e0e Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/429621 Reviewed-by: Samuel Rawlins <[email protected]> Commit-Queue: Brian Wilkerson <[email protected]> Reviewed-by: Brian Wilkerson <[email protected]>
1 parent 9c6c7c5 commit 2a69434

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pkg/analysis_server/test/lsp/code_actions_mixin.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -236,8 +236,8 @@ mixin CodeActionsTestMixin
236236
return false;
237237
}
238238

239-
if (kind != null) {
240-
expect(actionKind, kind);
239+
if (kind != null && actionKind != kind) {
240+
return false;
241241
}
242242

243243
// Some tests filter by only supplying a command, so if there is no

0 commit comments

Comments
 (0)