dotnet / dotnet/fsharp

Enums not completing in match expressions in VS 17.8.2

Open
#16,553 2 comments 0 reactions 0 assignees View on GitHub
Area-LangService-AutoComplete Bug Impact-Medium Regression
Dominant language
F#
Stars
4.3k
Forks
876
Avg merge
4d 22h
Merged PRs (30d)
144

Description

1. type in this code, with the last character the `.`:

```
fsharp
type E =
| Aaa = 0
| Bbb = 1
| Ccc = 2

let f(t: E) =
match t with
| E.
```
Expected behaviour: a tooltip pops up allowing the user to select from Aaa, Bbb or Ccc.

2. Type `A`

Expected behaviour: a tooltip popups up allowing the user to select `Aaa`.

Actual behaviour: no completion list shows at either point.

![image](https://github.com/dotnet/fsharp/assets/19760720/5f9d45c0-5984-46fd-ba05-93350eb5c159)

Discriminated unions do not have this problem.

Enums defined in dotnet code and consumed in F# seem to have problem 1 but not problem 2. But I only tested one example (`SqlDataType`).

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.