From c6b70d5966d924d3183f2c0e0aa0cc5a885ccfb8 Mon Sep 17 00:00:00 2001 From: Tomas Grosup Date: Tue, 31 Mar 2026 12:26:26 +0200 Subject: [PATCH] Add regression test for #6715: land is a valid identifier Verifies that land, lor, lxor, lsl, lsr, and asr can be used as valid identifiers after the ML compatibility removal in PR #19143. Fixes #6715 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../ErrorMessages/DiagnosticRegressionTests.fs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/tests/FSharp.Compiler.ComponentTests/ErrorMessages/DiagnosticRegressionTests.fs b/tests/FSharp.Compiler.ComponentTests/ErrorMessages/DiagnosticRegressionTests.fs index c8517a57e69..99d39b28fcd 100644 --- a/tests/FSharp.Compiler.ComponentTests/ErrorMessages/DiagnosticRegressionTests.fs +++ b/tests/FSharp.Compiler.ComponentTests/ErrorMessages/DiagnosticRegressionTests.fs @@ -3,6 +3,23 @@ module ErrorMessages.DiagnosticRegressionTests open Xunit open FSharp.Test.Compiler +// https://github.com/dotnet/fsharp/issues/6715 +[] +let ``Issue 6715 - land is a valid identifier after ML compat removal`` () = + FSharp + """ +let land = 3 +let lor = 4 +let lxor = 5 +let lsl = 6 +let lsr = 7 +let asr = 8 +let sum = land + lor + lxor + lsl + lsr + asr + """ + |> asLibrary + |> typecheck + |> shouldSucceed + // https://github.com/dotnet/fsharp/issues/15655 [] let ``Issue 15655 - error codes 999 and 3217 are distinct`` () =