Looking up reflected definition of overloaded extension methods fail at runtime.
This program is currently throwing a System.Reflection.AmbiguousMatchException:
type System.Object with
[<ReflectedDefinition>]
member this.Add(x) = x
[<ReflectedDefinition>]
member this.Add(x, y) = x + y
open FSharp.Quotations
[<EntryPoint>]
let main argv =
match <@ obj().Add(2) @> with
| (Patterns.Call(_, m, _)) ->
m |> Expr.TryGetReflectedDefinition |> printfn "%A"
| _ -> ()
0