From 3d378cea81982ab4d87458d1c893073fa9bbc934 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 14 Apr 2026 13:27:15 +0000 Subject: [PATCH] Add regression test: #14566, false positive unused value warnings in query CEs Fixes https://github.com/dotnet/fsharp/issues/14566 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../Language/ComputationExpressionTests.fs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/FSharp.Compiler.ComponentTests/Language/ComputationExpressionTests.fs b/tests/FSharp.Compiler.ComponentTests/Language/ComputationExpressionTests.fs index 13652e42ef3..9285e588f46 100644 --- a/tests/FSharp.Compiler.ComponentTests/Language/ComputationExpressionTests.fs +++ b/tests/FSharp.Compiler.ComponentTests/Language/ComputationExpressionTests.fs @@ -2270,6 +2270,9 @@ let data2 = [(1, "one"); (2, "two"); (3, "three")] let result = query { for x in data1 do join (y, name) in data2 on (x = y); select name }""" "let result = query { for a in [1;2;3] do for b in [4;5;6] do where (a < b); select (a + b) }" "let result = query { for x in [3;1;2] do sortBy x; select x }" + // https://github.com/dotnet/fsharp/issues/14566 + """let result = query { join a in ["x"] on ("x" = a); join b in ["y"] on ("y" = b); select a }""" + """let result = query { for r in [1;2;3] do for i in [true; false] do where i; select r }""" ] |> List.map (fun s -> [| box s |])