Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

C# syntax highlighting of interpolated strings #144291

Closed
dmcbride opened this issue Mar 3, 2022 · 1 comment
Closed

C# syntax highlighting of interpolated strings #144291

dmcbride opened this issue Mar 3, 2022 · 1 comment
Assignees
Labels
grammar Syntax highlighting grammar upstream-issue-linked This is an upstream issue that has been reported upstream

Comments

@dmcbride
Copy link

dmcbride commented Mar 3, 2022

Issue Type: Bug

I create a new C# file and put the following code into it:

namespace foo;
public class Foo
{
    public record Z(string s);
    public static string[] x = new [] {
        $"foo {{0}} bar{w}",
    };
}

I expect the interpolated string to show everything except the w in a single colour, the string colour. However, with the record, which isn't even being used anywhere else, the syntax highlighting is all over the map. If I comment out the record, then the string appears exactly as expected.

Expected:
image

Actual:
image

VS Code version: Code 1.64.2 (f80445a, 2022-02-09T22:02:29.527Z)
OS version: Linux x64 5.14.16-gentoo
Restricted Mode: No

System Info
Item Value
CPUs Intel(R) Core(TM) i7-8700K CPU @ 3.70GHz (12 x 3700)
GPU Status 2d_canvas: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: disabled_off
opengl: enabled_on
rasterization: disabled_software
skia_renderer: enabled_on
video_decode: disabled_software
vulkan: disabled_off
webgl: enabled
webgl2: enabled
Load (avg) 4, 5, 5
Memory (System) 31.30GB (0.41GB free)
Process Argv . --crash-reporter-id a35db7b1-57ea-4dd9-a3f7-4ffe723758c1
Screen Reader no
VM 0%
DESKTOP_SESSION /usr/share/xsessions/plasma
XDG_CURRENT_DESKTOP KDE
XDG_SESSION_DESKTOP KDE
XDG_SESSION_TYPE x11
Extensions: none
A/B Experiments
vsliv368cf:30146710
vsreu685:30147344
python383cf:30185419
vspor879:30202332
vspor708:30202333
vspor363:30204092
vswsl492:30256859
pythonvspyl392:30443607
pythontb:30283811
pythonvspyt551cf:30345471
pythonptprofiler:30281270
vshan820:30294714
vstes263cf:30335440
pythondataviewer:30285071
vscod805:30301674
pythonvspyt200:30340761
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
vsaa593cf:30376535
vsc1dst:30438360
pythonvs932:30410667
wslgetstarted:30433507
vsclayoutctrc:30437038
vsrem710:30416614
vscop841cf:30438916
dsvsc009:30440023
pythonvsnew555:30442236
vsbas813:30436447
vscscmwlcmc:30438804
helix:30440343
vsnot107:30443614

@mjbvz mjbvz assigned alexr00 and unassigned mjbvz Mar 3, 2022
@alexr00
Copy link
Member

alexr00 commented Mar 7, 2022

Duplicate of the upstream issue dotnet/csharp-tmLanguage#202

@alexr00 alexr00 closed this as completed Mar 7, 2022
@alexr00 alexr00 added grammar Syntax highlighting grammar upstream-issue-linked This is an upstream issue that has been reported upstream labels Mar 7, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Apr 21, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
grammar Syntax highlighting grammar upstream-issue-linked This is an upstream issue that has been reported upstream
Projects
None yet
Development

No branches or pull requests

3 participants