diff --git a/docs/release-notes/.FSharp.Compiler.Service/8.0.400.md b/docs/release-notes/.FSharp.Compiler.Service/8.0.400.md index 5bda852e8f46..82240b42625c 100644 --- a/docs/release-notes/.FSharp.Compiler.Service/8.0.400.md +++ b/docs/release-notes/.FSharp.Compiler.Service/8.0.400.md @@ -18,6 +18,7 @@ * Fix for exponential runtime in CE builders when using nested implicit yields [PR #17096](https://github.com/dotnet/fsharp/pull/17096) * Fix several AND operator parser bugs and regressions ([Issue #16447](https://github.com/dotnet/fsharp/issues/16447), [Issue #17134](https://github.com/dotnet/fsharp/issues/17134), [Issue #16309](https://github.com/dotnet/fsharp/issues/16309), [PR #17113](https://github.com/dotnet/fsharp/pull/17113)) * Treat exceptions as types in a namespace for graph based type checking ([Issue #17262](https://github.com/dotnet/fsharp/issues/17262), [PR #17268](https://github.com/dotnet/fsharp/pull/17268)) +* FS0243 - Unrecognized option: '--realsig-' #17561 ([Issue #17561](https://github.com/dotnet/fsharp/issues/17561), [PR #17268](https://github.com/dotnet/fsharp/pull/17562)) ### Added diff --git a/src/FSharp.Build/Fsc.fs b/src/FSharp.Build/Fsc.fs index 74e499ad86e9..3394e8e97284 100644 --- a/src/FSharp.Build/Fsc.fs +++ b/src/FSharp.Build/Fsc.fs @@ -56,7 +56,7 @@ type public Fsc() as this = let mutable preferredUILang: string MaybeNull = null let mutable publicSign: bool = false let mutable provideCommandLineArgs: bool = false - let mutable realsig: bool = false + let mutable realsig: bool option = None let mutable references: ITaskItem[] = [||] let mutable referencePath: string MaybeNull = null let mutable refOnly: bool = false @@ -196,10 +196,10 @@ type public Fsc() as this = builder.AppendSwitch("--optimize-") // realsig - if realsig then - builder.AppendSwitch("--realsig+") - else - builder.AppendSwitch("--realsig-") + match realsig with + | Some true -> builder.AppendSwitch("--realsig+") + | Some false -> builder.AppendSwitch("--realsig-") + | None -> () // Tailcalls if not tailcalls then @@ -539,8 +539,11 @@ type public Fsc() as this = // --realsig[+-] member _.RealSig - with get () = realsig - and set (b) = realsig <- b + with get () = + match realsig with + | Some true -> true + | _ -> false + and set (b) = realsig <- Some b // -r : Reference an F# or .NET assembly. member _.References