fsharp icon indicating copy to clipboard operation
fsharp copied to clipboard

tooltip for enums show `[<Struct>] type` instead of `enum`

Open smoothdeveloper opened this issue 1 year ago • 1 comments

I noticed minor issue with tooltips, that affects both VS & Rider:

type Foo = 
| F = 1
| G = 2

Visual Studio (Version 17.10.0 Preview 1.0): image Rider (2024.1 EAP 8): image VS Code+Ionide (v7.18.2): image

I believe it should show the same as in Ionide, or at least, not show struct.

smoothdeveloper avatar Mar 21 '24 20:03 smoothdeveloper

Well, to be fair, enum is struct:

public abstract partial class Enum : ValueType ...

And since in F# we don't have a special keyword or shape for enums (apart from its declaration), it's not entirely incorrect to show it as struct type.

vzarytovskii avatar Mar 25 '24 17:03 vzarytovskii