Open
Description
There are some cases where an invalid value is returned from a trait call.
Repro steps
- Step A
try in fsi
type A = A with
static member ($) (A, a: float ) = 0.0
static member ($) (A, a: decimal) = 0M
static member ($) (A, a: 't ) = 0
let inline call x = ($) A x
send it
- Step B
Now try this call 42.
Expected behavior
val it : float = 0.0
Actual behavior
val it : obj = <null>
Known workarounds
I haven't found one so far.
- Operating system: Windows
- FSI: F# Interactive version 11.4.2.0 for F# 5.0
- Editing Tools: Visual Studio 2019
I didn't try in older versions, but I'm under the impression that this is a regression.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
New