You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Does this issue occur when all extensions are disabled?: Yes
VS Code Version: 1.61.2
OS Version: Windows 10 21H1
Some keywords have the wrong scope causing weird syntax highlighting
Steps to Reproduce:
Use more recent C# features such as target-typed new or the is not operation or the and/or keywords in a switch statement
Open the command pallete
Use the command "Developer: Inspect Editor Tokens and Scopes"
Sample code
using System;namespaceHelloWorld{publicclassMyClass{publicMyClass(){}}classProgram{staticvoidMain(string[]args){varstringArr=new[]{"",""};// new shows as keyword which is probably the expected behaviorMyClassmyClassInstance=new();// new shows as a function callif(myClassInstance is not null)// is shows as keyword but not shows as a type annotation{}intx=10;switch(x){case>1 and <5 or 10:// both and and or show as variable namesbreak;default:break;}}}}
Screenshots:
The text was updated successfully, but these errors were encountered:
Originally from @gustavo-shigueo in microsoft/vscode#136442
Does this issue occur when all extensions are disabled?: Yes
Some keywords have the wrong scope causing weird syntax highlighting
Steps to Reproduce:
Sample code
Screenshots:
The text was updated successfully, but these errors were encountered: