You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
FuncConvert.FromFunc(x => handler(x)) should do the trick.
Handler is just a normal method in IL. When a normal method is passed into an FSharpFunc function argument within F# files the compiler will generate the accompanying function type that inherits from FSharpFunc. Just like the C# compiler does the something similar for lambda's by generating a DisplayClass. But although the F# compiler also has support for doing that same work for Func and Action, the C# compiler doesn't at all know about FSharpFunc.
Not sure if there's a more elegant way to fix this, method groups aren't really something you could implicitly convert, nor do I think that's a great idea...
The text was updated successfully, but these errors were encountered: