fsharp
fsharp copied to clipboard
SO in non-recursive bindings checks
Consider having file with module and a bunch of nested modules and bindings in all of them, it will fail with SO. Declaring module as rec will fix it. It is some corner case of https://github.com/dotnet/fsharp/issues/16869
Issue is in calling between TcModuleOrNamespaceElementNonMutRec and TcModuleOrNamespaceElements, calls are not tail recursive (due to using builder). It will also likely only occur in full CLR, coreclr's JIT is much better at dealing with tail prefixes.