ionide / ionide-vscode-fsharp

VS Code plugin for F# development
http://ionide.io
MIT License
850 stars 276 forks source link

Incorrect semantic highlight when a `static member` has an optional argument #1962

Open MangelMaxime opened 7 months ago

MangelMaxime commented 7 months ago

Describe the bug

CleanShot 2023-11-25 at 22 58 31@2x

Note how the second [<Second...>] is not highlighted correctly.

Steps to reproduce

(***)
#r "nuget: Fable.Core"
(***)

open Fable.Core
open System

[<Erase>]
type Exports =
    [<Import("hello", "module")>]
    static member hello (name: string) : unit = nativeOnly

    [<Import("hello", "module")>]
    static member hello2 (?name: string) : unit = nativeOnly

Expected behaviour

Should have the same colorisation in both case

Machine info