Invalid error range for special cases of NoEquality types
- Dominant language
- F#
- Stars
- 4.3k
- Forks
- 876
- Avg merge
- 4d 22h
- Merged PRs (30d)
- 144
Description
**Repro steps**
This code:
```fsharp
[]
type MyType(field: string) =
member _.Field = field
module internal MyTypeHelpers =
let f (myType: MyType) =
42
let g myType =
let x = myType
let y = myType
let z = x = y
f myType
```
**Expected behavior**
An error on the line `let z = x = y`
**Actual behavior**
Error on the last line:

**Related information**
Any of the below fixes the case:
1) Removing explicit type in the first helper - that the first helper infers input as a general type and the second helper infer input as something with equality
2) Adding explicit type to the second helper - just works as expected

Also, note that the error message mentioned the correct range.
Contributor guide
Assessment
This issue has not been assessed yet.