You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Setting a variable inside a foreach-object loop, it shows the variable as assigned but never used, when it is used outside of the foreach.
Example for replication:
$Array |ForEach-Object {$NewVar = 1};$NewVar
My original problem the first time I set $Added, it has no green squiggle line and appears fine (it recognizes the variable is used later on), but within the foreach-object the same variable is shown as being assigned but never used.:
Issue Type: Bug
Setting a variable inside a foreach-object loop, it shows the variable as assigned but never used, when it is used outside of the foreach.
Example for replication:
$Array |ForEach-Object {$NewVar = 1};$NewVar
My original problem the first time I set $Added, it has no green squiggle line and appears fine (it recognizes the variable is used later on), but within the foreach-object the same variable is shown as being assigned but never used.:
$Added = 0
If ($Adds) {$Adds |ForEach-Object {Try {$Added += 1}Catch {}}}
$AddsElement.SetAttribute("Success",$Added)
Extension version: 1.7.0
VS Code version: Code 1.24.1 (24f62626b222e9a8313213fb64b10d741a326288, 2018-06-13T17:51:32.889Z)
OS version: Windows_NT x64 10.0.15063
System Info
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
native_gpu_memory_buffers: disabled_software
rasterization: disabled_software
video_decode: enabled
video_encode: enabled
vpx_decode: enabled
webgl: enabled
webgl2: enabled
The text was updated successfully, but these errors were encountered: