Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inline variable: does not treat all distributive operators correctly #58357

Open
mikebosland opened this issue Apr 25, 2024 · 0 comments
Open
Labels
Bug A bug in TypeScript Help Wanted You can do this
Milestone

Comments

@mikebosland
Copy link

Type: Bug

  1. Create a variable with an operator that is sensitive to the distributive law. For example this code in Javascript/Dart: var foo = 3 - 2;.
  2. Reference the first variable using a distributive operator. Example var bar = 4 - foo;
  3. Select foo and inline variable.
  • Actual Result: var bar = 4 - 3 - 2;
  • Expected Result: var bar = 4 - (3 - 2);

Note: I've worded this more generally than just Inline variable breaks for distributing - in case there are other cases that break. The Inline variable refactor works correctly for *.

VS Code version: Code 1.88.1 (e170252f762678dec6ca2cc69aba1570769a5d39, 2024-04-10T17:34:12.840Z)
OS version: Linux x64 6.5.0-27-generic snap
Modes:

System Info
Item Value
CPUs AMD Ryzen 9 5950X 16-Core Processor (32 x 3776)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: disabled_off
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
video_decode: enabled
video_encode: disabled_software
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: disabled_off
Load (avg) 1, 1, 1
Memory (System) 125.71GB (97.87GB free)
Process Argv --no-sandbox --force-user-env --unity-launch --crash-reporter-id 59849d9b-79ea-404b-94df-23fed22783e1
Screen Reader no
VM 0%
DESKTOP_SESSION ubuntu
XDG_CURRENT_DESKTOP Unity
XDG_SESSION_DESKTOP ubuntu
XDG_SESSION_TYPE x11
Extensions (23)
Extension Author (truncated) Version
dart-code Dar 3.86.0
flutter Dar 3.86.0
vscode-markdownlint Dav 0.55.0
copilot Git 1.182.0
copilot-chat Git 0.14.1
go gol 0.41.4
openscad-language-support Lea 1.2.5
vscode-docker ms- 1.29.0
csdevkit ms- 1.4.29
csharp ms- 2.23.15
vscode-dotnet-runtime ms- 2.0.3
debugpy ms- 2024.4.0
python ms- 2024.4.1
vscode-pylance ms- 2024.4.1
remote-containers ms- 0.354.0
cmake-tools ms- 1.17.17
cpptools ms- 1.19.9
cpptools-extension-pack ms- 1.3.0
cmake twx 0.0.17
vscode-gradle vsc 3.13.5
vim vsc 1.27.2
clang-format xav 1.9.0
vscode-proto3 zxh 0.5.5

(1 theme extensions excluded)

A/B Experiments
vsliv368:30146709
vspor879:30202332
vspor708:30202333
vspor363:30204092
vscorecescf:30445987
vscod805:30301674
binariesv615:30325510
vsaa593:30376534
py29gd2263:31024239
c4g48928:30535728
azure-dev_surveyone:30548225
962ge761:30959799
pythongtdpath:30769146
welcomedialog:30910333
pythonidxpt:30866567
pythonnoceb:30805159
asynctok:30898717
pythontestfixt:30902429
pythonregdiag2:30936856
pyreplss1:30897532
pythonmypyd1:30879173
pythoncet0:30885854
2e7ec940:31000449
pythontbext0:30879054
accentitlementsc:30995553
dsvsc016:30899300
dsvsc017:30899301
dsvsc018:30899302
cppperfnew:31000557
d34g3935:30971562
fegfb526:30981948
bg6jg535:30979843
ccp2r3:30993541
dsvsc020:30976470
pythonait:31006305
gee8j676:31009558
showvideoc:31016891
dsvsc021:30996838
724cj586:31013169
pythoncenvptcf:31022791

@roblourens roblourens assigned mjbvz and unassigned roblourens Apr 25, 2024
@mjbvz mjbvz transferred this issue from microsoft/vscode Apr 29, 2024
@RyanCavanaugh RyanCavanaugh added the Bug A bug in TypeScript label Apr 29, 2024
@RyanCavanaugh RyanCavanaugh added the Help Wanted You can do this label Apr 29, 2024
@RyanCavanaugh RyanCavanaugh added this to the Backlog milestone Apr 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A bug in TypeScript Help Wanted You can do this
Projects
None yet
Development

No branches or pull requests

4 participants