I've been following the discussions around the stricter visibility handling around inline functions, but haven't been able to find anyone mentioning what I've encountered.
Ensure that TreatWarningsAsErrors is not turned on
dotnet run
Doing that I get the following:
Unhandled exception. System.NotSupportedException: Dynamic invocation of op_Dollar is not supported
at Program.privateFoo[a](a x) in /Users/sunea/dev/playground/PrivateInline/Program.fs:line 21
at <StartupCode$PrivateInline>.$Program.main@() in /Users/sunea/dev/playground/PrivateInline/Program.fs:line 25
Expected behavior
I expect this to either work as normal, or for this to be an error.
I know and appreciate that warnings as errors is considered best practice, and I only stumbled upon this because one of our project didn't have it set, even though it should (so hey, it helped me there!).
I've been following the discussions around the stricter visibility handling around inline functions, but haven't been able to find anyone mentioning what I've encountered.
If this has been fixed by https://github.com/dotnet/fsharp/pull/17201 then feel free to close and ignore this.
Repro steps
Provide the steps required to reproduce the problem:
TreatWarningsAsErrors
is not turned ondotnet run
Doing that I get the following:
Expected behavior
I expect this to either work as normal, or for this to be an error.
I know and appreciate that warnings as errors is considered best practice, and I only stumbled upon this because one of our project didn't have it set, even though it should (so hey, it helped me there!).
Actual behavior
System.NotSupportedException
Known workarounds
Removing the privates
Related information
Provide any related information (optional):