FSharp.Compiler.PortaCode icon indicating copy to clipboard operation
FSharp.Compiler.PortaCode copied to clipboard

allow for generic trait calls

Open kevmal opened this issue 4 years ago • 1 comments

Current version fails with missing method exception on op --> (DiffSharp). This is because EvalTraitCallInvoke uses InvokeMember which does not support generic methods. As an alternative type parameters are matched, generic methods are created and Type.DefaultBinder.BindToMethod is then called directly.

This change alone fixes the diffsharp shape checking on -->. To add a test exit needed to be removed from ProcessCommandLine otherwise the failing test causes the test host process to exit. Furthermore since the test is not using a method in an external assembly, phase4 of EmitInterpretExpression needed to be updated to add generic parameters to the env prior to resolving parameter and return types.

kevmal avatar Jan 01 '21 17:01 kevmal

Cool thanks!

Any idea why CI was failing on Windows? I'm re-running it now

dsyme avatar Jan 11 '21 11:01 dsyme