dotnet / dotnet/fsharp

Incorrect range highlighting with qualified access to the operator

Open
#11,288 0 comments 0 reactions 0 assignees View on GitHub
Area-Diagnostics Feature Improvement
Dominant language
F#
Stars
4.3k
Forks
876
Avg merge
4d 11h
Merged PRs (30d)
131

Description

**Repro steps**

Paste the following code snippets into the editor

```f#
module Foo =
let inline (==) a b = a + b

let o = obj()
let _ = Foo.(==) o
```

**Expected behavior**

The error highlighting range covers the entire expression `Foo.(==)`

**Actual behavior**

The error highlighting range doesn't take into account the parenthesis and only covers `Foo.(==`

![image](https://user-images.githubusercontent.com/26364714/111904197-a54c6580-8a56-11eb-8849-f188806fbd81.png)

Probably, the problem is that the range of the expression in this case is calculated as a union of the idents ranges, without taking into account the parentheses.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.