Skip to content

C# syntax highlighting broken with collection expressions and string interpolation in method calls #332

@alexr00

Description

@alexr00

Type: Bug

Description: the syntax highlighter incorrectly colors string interpolation when using collection expressions like string[] array = [...] followed by method calls with interpolated strings

Info(
  $"Hello: '{thing}'",
  $"Foo: {string.Join(", ", fooz)}",
  $"Bar: {string.Join(", ", barz)}"
);
Image

the second comma ", ", betweens the params are orange
orange | orange
Image

im used to em like this
orange | white
Image


this is expected color of the comma thats a string and the comma that separates the parameters are different

string.Join(", ", fooz)

this is what getting both commas are the same color

$"Foo: {string.Join(", ", fooz)}",

so basically this is expected
blue | white
Image

this is what im getting
blue | blue
Image

Originally from @ezexe in microsoft/vscode#255178

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions