Skip to content

!= 0 is suggested within cmp.Or #280475

@DanielRosenwasser

Description

@DanielRosenwasser

Type: Bug

	prefsDiffer := cmp.Or(
		cmp.Compare(oldPrefs.ImplementationsCodeLensEnabled, newPrefs.ImplementationsCodeLensEnabled)/*$*/
	)

At the cursor, Copilot suggests the text != 0 even though the entire pattern around cmp.Or is to pass in integers, not booleans.

Extension version: 1.388.0
VS Code version: Code - Insiders 1.107.0-insider (66e6d71, 2025-12-01T05:02:38.445Z)
OS version: Windows_NT arm64 10.0.26200
Modes:
Connection to 'codespaces+turbo-robot-jjr9g4wjpg35rgp' could not be established
Remote OS version: Linux x64 6.8.0-1030-azure

Copilot Completion Feedback

Describe the issue, feedback, or steps to reproduce it:

Completion text:

		cmp.Compare(oldPrefs.ImplementationsCodeLensEnabled, newPrefs.ImplementationsCodeLensEnabled) != 0,
Diagnostics

Copilot Extension

  • Version: 0.34.2025120102
  • Editor: vscode 1.107.0-insider
  • Header Request ID: 50386776-30e4-4f6c-8cbb-c54345a4e8d9
  • Choice Index: 0
  • Opportunity ID: icr-85c6ce5c-b209-45ef-a237-455cc3d7b2cd
  • Client Completion ID: 67ab436b-c62c-46e1-8093-6f53466d68b6
  • Model ID: gpt-41-copilot
System Info
Item Value
CPUs Snapdragon(R) X 12-core X1E80100 @ 3.40 GHz (12 x 2976)
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: enabled
webgl: enabled
webgl2: enabled
webgpu: enabled
webnn: unavailable_software
Load (avg) undefined
Memory (System) 31.57GB (5.84GB free)
Process Argv --log trace --crash-reporter-id 015215b6-bb70-47cd-8123-03256286a4ff
Screen Reader no
VM 0%

Connection to 'codespaces+turbo-robot-jjr9g4wjpg35rgp' could not be established

Item Value
Remote Codespaces: humble yodel
OS Linux x64 6.8.0-1030-azure
CPUs AMD EPYC 7763 64-Core Processor (32 x 0)
Memory (System) 125.79GB (117.73GB free)
VM 0%
A/B Experiments
vsliv368cf:30146710
pythonvspyt551cf:31249598
nativeloc1:31118317
dwcopilot:31158714
dwoutputs:31242946
copilot_t_ci:31333650
g012b348:31231168
pythonrdcb7:31268811
pythonpcpt1:31399616
6518g693:31302842
b6b4d950:31327385
6abeh943:31336334
envsactivate1:31349248
editstats-enabled:31346256
cloudbuttont:31366566
aihoversummaries_t:31413033
todos-1:31405333
qwen_all_req:31396049
3efgi100_wstrepl:31403338
trigger-command-fix:31379601
auto_model_enabled:31396818
use-responses-api:31390341
je187915:31401257
nes-next-cursor-1104-label-edit:31426497
3i15c187:31419923
agentic_ask_h7d75428:31406124
copilot-nes-oct-t:31413017
metis_rerank_treatment1:31411021
terminalsuggestenabled:31421703
none:31426257
cp_cls_c_966_ss:31426491
chatvisible:31417128
expandedtokens:31418009
inlinechat_v2_hd992725:31426642
c0683394:31426860
3gif2411:31422463
find_all_ref_in_bg_f:31420846
9cj19850:31423615
478ah919:31426749
ge8j1254_inline_auto_hint_haiku:31426887
diagnostics:31426890
b53de340:31426751
a5gib710:31426879
5j92g670_sonnet:31426790
no_request_with_suggest:31426863
rename_disabled:31426870
nes-joint-0:31426898

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions