dotnet / dotnet/fsharp

type parameters in tooltip can be bogus / inconsistent with whole signature when 'a is used for an explicit type parameter

Open
#8,233 2 comments 0 reactions 0 assignees View on GitHub
Area-LangService-ToolTips Bug Impact-Low
Dominant language
F#
Stars
4.3k
Forks
876
Avg merge
4d 11h
Merged PRs (30d)
131

Description

In Visual Studio, with the following function, hovering on the `b` parameter shows `'a` as parameter type, which is incorrect (`b` isn't of same type as parameter `a`) and inconsistent with what is shown hovering on the function itself.

```fsharp
let a (a: 'a) b (c:'b) = a,b,c
```

![image](https://user-images.githubusercontent.com/87944/72535221-7a75e880-3878-11ea-92bc-87b20f9f6e70.png)

note also that it won't honor `c` parameter type when hovering on the `z` function and show the wrong one for `b`, whenever `'a0` is used explicitly (this is a corner case and less of an issue, revealing an implementation detail).

```fsharp
let z (a: 'a0) b (c:'a) = a,b,c
```

![image](https://user-images.githubusercontent.com/87944/72535910-9cbc3600-3879-11ea-97e1-79a04f2cf5d3.png)

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.