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
This will reproduce on pretty much every C# project I've tested, even dotnet new console.
Type in the following code to the editor
strings1="hello";// string is coloredawaitforeach(varxine){}strings2="world";// string is not colored
Notice that the presence of await foreach causes the second usage of string to not get properly syntax highlighted. It will be white instead of blue. The moment you delete await then everything will snap back to normal.
This problem appears to impact a number of C# 8 features. For instance the same effect occurs when using a nullable array.
strings1="hello";// string is coloredint[]?example;strings2="world";// string is not colored
The text was updated successfully, but these errors were encountered:
OmniSharp exposes semantic highlighting endpoint based on Roslyn's semantic highlighting (I added your two cases as tests here to make sure they are covered (#1789)) but at the moment the C# extension still doesn't use that endpoint - it's a work in progress to incorporate it github.com/dotnet/vscode-csharp/pull/3667
This will reproduce on pretty much every C# project I've tested, even
dotnet new console
.Type in the following code to the editor
Notice that the presence of
await foreach
causes the second usage ofstring
to not get properly syntax highlighted. It will be white instead of blue. The moment you deleteawait
then everything will snap back to normal.This problem appears to impact a number of C# 8 features. For instance the same effect occurs when using a nullable array.
The text was updated successfully, but these errors were encountered: