Skip to content

Using delegate keyword breaks semantic highlighting #16982

Open
@T-Gro

Description

@T-Gro

image

Microsoft Visual Studio Enterprise 2022
Version 17.11.0 Preview 1.0 [34801.192.main]
VisualStudio.17.IntPreview/17.11.0-pre.1.0+34801.192.main

Visual F# Tools 17.10.0-dev
Microsoft Visual F# Tools

The screenshot above was done custom-built .vsix for the nullness feature branch.
For a regular preview VS, it is differently wrong:

image
Microsoft Visual Studio Enterprise 2022
Version 17.10.0 Preview 2.0
VisualStudio.17.Preview/17.10.0-pre.2.0+34707.107

Visual F# Tools 17.10.0-beta.24127.3+b57dee7cec971021547a7b8a36a46d7271fea99e
Microsoft Visual F# Tools

This is self-contained code to reproduce this:

[<RequireQualifiedAccess>]
type ErrorReportType =
    | Warning
    | Error

type ResolvingErrorReport = delegate of ErrorReportType * int * string -> unit

Another snippet demonstrating this is clearly wrong is repeating the same type more types, yet getting difference in the color:

type ResolvingErrorReport = delegate of int * System.Int32 * System.Int32 * int -> unit

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area-VS-EditorVS editor support for F# code, not covered elsewhereBugImpact-Medium(Internal MS Team use only) Describes an issue with moderate impact on existing code.help wanted

    Type

    Projects

    Status

    New

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions