F# strange difference in resolving class method calls
Open
Area-Compiler-Checking
Area-Compiler-Checking-Overloads
Bug
Impact-Low
- Dominant language
- F#
- Stars
- 4.3k
- Forks
- 876
- Avg merge
- 4d 22h
- Merged PRs (30d)
- 144
Description
Given the following F# code
```
type MyClass = class end
type MyWorker1() =
(*1*)member this.DoWork(myObject: MyClass) = ()
(*2*)member this.DoWork(myObjects: MyClass seq) = myObjects |> Seq.iter this.DoWork //Resolves to (*1*)
type MyWorker2() =
(*3*)member this.DoWork(myObject: #MyClass) = ()
(*4*)member this.DoWork(myObjects: #MyClass seq) = myObjects |> Seq.iter this.DoWork //Resolves to (*4*)
```
in MyWorker2 the call this.DoWork is resolved as recursive call. I'd expect to behave as in MyWorker1, that is call (*3*).
Contributor guide
Assessment
This issue has not been assessed yet.