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
When defining a variable using type hint (e.g. [string]$helloStr = "hi"), Go to definition no longer works; however if I remove the [string] part the the beginning, it will work fine.
Does not work:
[string]$hello="test"Write-Host$hello# no definition found for '$hello'
works fine:
$hello="test"Write-Host$hello# it goes to the line of definition
PowerShell Version
PS> $PSVersionTableName Value---- -----PSVersion 7.3.2PSEdition CoreGitCommitId 7.3.2OS Microsoft Windows 10.0.19042Platform Win32NTPSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}PSRemotingProtocolVersion 2.3SerializationVersion 1.1.0.1WSManStackVersion 3.0
Define a variable while specifying its type behind it and try to press F12 (or ctrl + left-click or click on Go to definition from right-click context menu).
Visuals
Logs
No response
The text was updated successfully, but these errors were encountered:
Prerequisites
Summary
When defining a variable using type hint (e.g.
[string]$helloStr = "hi"
), Go to definition no longer works; however if I remove the[string]
part the the beginning, it will work fine.Does not work:
works fine:
PowerShell Version
Visual Studio Code Version
Extension Version
Steps to Reproduce
Define a variable while specifying its type behind it and try to press
F12
(orctrl + left-click
or click onGo to definition
from right-click context menu).Visuals
Logs
No response
The text was updated successfully, but these errors were encountered: