dotnet / roslyn

The Roslyn .NET compiler provides C# and Visual Basic languages with rich code analysis APIs.
https://docs.microsoft.com/dotnet/csharp/roslyn-sdk/
MIT License
18.98k stars 4.03k forks source link

Closing parenthesis of pointer-type cast is colored incorrectly #68536

Open just-ero opened 1 year ago

just-ero commented 1 year ago

Version Used

Compiler: 4.12.0-3.24470.4 (d799b056)
.NET: 9.0.100-rc.1.24452.12
Visual Studio Code: 1.93.1, 38c31bc77e0dd6ae88a4e9cc93428cc27a56ba40, x64
C# Extension: v2.49.25
C# Dev Kit Extension: v1.11.11

Steps to Reproduce

  1. Create or open a C# project in Visual Studio Code (Visual Studio untested).
  2. Add the following code wherever syntactically applicable:
    var nullptr = (void*)0;
  3. Observe the closing parenthesis being colored incorrectly.

Expected Behavior

The parenthesis should have the same color as its opening counterpart.

Actual Behavior

The parenthesis has the same color as the * operator.

just-ero commented 1 week ago

This is still the case today. Interestingly, the closing parenthesis after (void**)0 is colored correctly.