Closed
Description
For example the following code:
type JustOverloads() =
member x.Overload(i:int) =
i + 42
member x.Overload(s:string) =
int s + 42
The symbol Overload
is a MemberFunctionOrValue
but is assigned a ValRef
type so the Overloads
code doesnt ever return an item:
member x.Overloads matchParameterNumber =
checkIsResolved()
match d with
| M m ->
match item with
| Item.MethodGroup (_name, methodInfos) ->
let methods =
if matchParameterNumber then
methodInfos
|> List.filter (fun methodInfo -> not (methodInfo.NumArgs = m.NumArgs) )
else methodInfos
methods
|> List.map (fun mi -> FSharpMemberOrFunctionOrValue(cenv, M mi, item))
|> makeReadOnlyCollection
|> Some
| _ -> None
| _ -> None
Im not sure why the members are created as ValRef
rather than MethInfo
is it the case that only C# types with overloads are assigned that way?