Fsharp: Compiler failure when inlining static method

Created on 16 Jul 2020  路  4Comments  路  Source: dotnet/fsharp

When compiling code that inlines a call to a static member with a method parameter type of obj it throws with

Fsc: error FS0192(0,0): error : the anonymous record <>f__AnonymousType3440295454`2 has not been
 generated in the pre-phase of generating this module

Repro steps

I tried to extract many various parts from the Fable repo and my library to produce a more compact reproduction, but I can't reproduce the failure when I do that.

Known workarounds

Removing the inline allows the compilation to succeed (see compiler directives in repro steps).

Related information

Tested with both dotnet cli 3.1.101 and 3.1.302

Visual Studio 16.6.4

Might be related to #6434?

Area-Compiler Severity-High bug

All 4 comments

I believe @isaacabraham ran into this somehow in Farmer as well as per https://twitter.com/isaac_abraham/status/1292124826522603524

Tagging this with urgency-now since the message is absolutely awful and clearly blocks people from progressing without sheer guesswork.

There's a likely fix for this here: https://github.com/dotnet/fsharp/pull/9996

Was this page helpful?
0 / 5 - 0 ratings