Expected result: The syntaxt highlighting remains consistent as T const& and const T& are semantically identical notations.
Observed result: The syntax highlighting of FunctionThree() breaks.
I also tested this with a clean install of VS Code in Windows Sandbox. A slightly different color scheme and syntax highlighting, but the error was the same.
My own VS Code installation (looks the same with or without disabled extensions):
Completely clean Sandbox installation:
VS Code version: Code 1.70.2 (e4503b30fc78200f846c62cf8091b76ff5547662, 2022-08-16T05:35:13.448Z)
Type: Bug
Description: Having a function return a constant reference (
T const&
) breaks syntax highlighting for that function declaration.Severity: Little-to-none. There's no loss of productivity arising from this bug, but it's clearly an oversight.
Reproducibility: Consistent.
Steps to reproduce:
Expected result: The syntaxt highlighting remains consistent as
T const&
andconst T&
are semantically identical notations.Observed result: The syntax highlighting of
FunctionThree()
breaks.I also tested this with a clean install of VS Code in Windows Sandbox. A slightly different color scheme and syntax highlighting, but the error was the same.
My own VS Code installation (looks the same with or without disabled extensions):
Completely clean Sandbox installation:
VS Code version: Code 1.70.2 (e4503b30fc78200f846c62cf8091b76ff5547662, 2022-08-16T05:35:13.448Z)
OS version: Windows_NT x64 10.0.22000
Originally from @martycagas in https://github.com/microsoft/vscode/issues/159456