From 2465c0e5ecb5efdb4755c222a1b3890dd57ac9e7 Mon Sep 17 00:00:00 2001 From: Repo Assist Date: Thu, 26 Feb 2026 18:18:38 +0000 Subject: [PATCH 1/4] test: add ignored test case for FSAC0002 false positive in nullable join (issue #824) The FCS SimplifyNames.getSimplifiableNames incorrectly marks row1 as a redundant qualifier when using the nullable join operator (=?) in a query expression. The identifier is actually required and removing it would break the code. This test documents the expected behavior (fix should NOT be offered). It uses itestCaseAsync because the bug is upstream in FCS and has no immediate fix in FSAC. When FCS is fixed, change itestCaseAsync to testCaseAsync. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../CodeFixTests/Tests.fs | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/test/FsAutoComplete.Tests.Lsp/CodeFixTests/Tests.fs b/test/FsAutoComplete.Tests.Lsp/CodeFixTests/Tests.fs index fee7850ec..76cd33738 100644 --- a/test/FsAutoComplete.Tests.Lsp/CodeFixTests/Tests.fs +++ b/test/FsAutoComplete.Tests.Lsp/CodeFixTests/Tests.fs @@ -2404,6 +2404,28 @@ let private removeRedundantQualifierTests state = let _ = $0System.String.IsNullOrWhiteSpace "foo" """ Diagnostics.acceptAll + selectCodeFix + + // Issue #824: FCS incorrectly reports `row1` as a redundant qualifier in a nullable join + // clause using `=?`. This is an upstream FCS bug (getSimplifiableNames returns wrong result + // for nullable join operators). When FCS is fixed, change `itestCaseAsync` -> `testCaseAsync`. + itestCaseAsync "doesn't remove necessary qualifier in nullable join clause (issue #824)" + <| CodeFix.checkNotApplicable + server + """ + open System + open Microsoft.FSharp.Linq.NullableOperators + + let table1 = [ for i in 0..10 -> {| Column1 = i |} ] + let table2 = [ for i in 0..10 -> {| Column2 = Nullable(i) |} ] + + query { + for row1 in table1 do + join row2 in table2 on ($0row1.Column1 =? row2.Column2) + select (row1, row2) + } + """ + Diagnostics.acceptAll selectCodeFix ]) let private removeUnnecessaryReturnOrYieldTests state = From 0e4fa15c6ebd8444ececc1c65bb61660c1706060 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 26 Feb 2026 18:20:17 +0000 Subject: [PATCH 2/4] ci: trigger CI checks From 667c435e8a8ed0c85ce9d58628c99c70629fd7b5 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 26 Feb 2026 18:58:56 +0000 Subject: [PATCH 3/4] test: unignore FSAC0002 nullable join test (issue #824) Change itestCaseAsync to testCaseAsync to activate the regression test and check if the upstream FCS bug has been fixed. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- test/FsAutoComplete.Tests.Lsp/CodeFixTests/Tests.fs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/FsAutoComplete.Tests.Lsp/CodeFixTests/Tests.fs b/test/FsAutoComplete.Tests.Lsp/CodeFixTests/Tests.fs index 76cd33738..04ebddae2 100644 --- a/test/FsAutoComplete.Tests.Lsp/CodeFixTests/Tests.fs +++ b/test/FsAutoComplete.Tests.Lsp/CodeFixTests/Tests.fs @@ -2407,9 +2407,9 @@ let private removeRedundantQualifierTests state = selectCodeFix // Issue #824: FCS incorrectly reports `row1` as a redundant qualifier in a nullable join - // clause using `=?`. This is an upstream FCS bug (getSimplifiableNames returns wrong result - // for nullable join operators). When FCS is fixed, change `itestCaseAsync` -> `testCaseAsync`. - itestCaseAsync "doesn't remove necessary qualifier in nullable join clause (issue #824)" + // clause using `=?`. This was an upstream FCS bug (getSimplifiableNames returns wrong result + // for nullable join operators). + testCaseAsync "doesn't remove necessary qualifier in nullable join clause (issue #824)" <| CodeFix.checkNotApplicable server """ From 2c07fd17e6be6c08debd31a2f9e3a97df14ecce0 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 26 Feb 2026 19:00:36 +0000 Subject: [PATCH 4/4] ci: trigger CI checks