Skip to content

Wrong name is underlined when trying to assign to a constant #14018

@cD1rtX3

Description

@cD1rtX3

Type: Bug

If I were to write something like this:

struct {
    const int i;
} s;
s.i = 0;

instead of underlining i to give the error like it should, it underlines s, when s isn't constant. If s was constant, this would be the correct behaviour.

Extension version: 1.28.3
VS Code version: Code 1.105.1 (7d842fb85a0275a4a8e4d7e040d2625abbf7f084, 2025-10-14T22:33:36.618Z)
OS version: Linux x64 6.8.0-86-generic
Modes:

System Info
Item Value
CPUs Intel(R) Core(TM) i5-10210U CPU @ 1.60GHz (8 x 2400)
GPU Status 2d_canvas: enabled
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
trees_in_viz: disabled_off
video_decode: enabled
video_encode: disabled_software
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: disabled_off
webnn: disabled_off
Load (avg) 2, 1, 1
Memory (System) 15.34GB (9.74GB free)
Process Argv --crash-reporter-id 3cdbf6ce-6d27-475a-ae69-ae7116a9bb80
Screen Reader no
VM 0%
DESKTOP_SESSION ubuntu
XDG_CURRENT_DESKTOP Unity
XDG_SESSION_DESKTOP ubuntu
XDG_SESSION_TYPE x11
A/B Experiments
vsliv368cf:30146710
binariesv615:30325510
nativeloc1:31344060
dwcopilot:31170013
dwoutputs:31242946
copilot_t_ci:31333650
e5gg6876:31282496
pythonrdcb7:31342333
aj953862:31281341
nes-set-on:31340697
6abeh943:31336334
aa_c:31379599
gendocstringf:31405073
0574c672:31404437
cloudbuttont:31379625
todos-1:31405332
qwen_all_req:31402696
treatment_gpt5applypatchexclusively:31398171
3efgi100_wstrepl:31403338
trigger-command-fix:31379601
auto_model_enabled:31385282
grok-v2-prompt:31401223
use-responses-api:31390855
applesignin:31399435
anonusage:31403420
ddidtcf:31399634
d5i5i512:31405346

Metadata

Metadata

Assignees

Labels

Type

Projects

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions