-
Notifications
You must be signed in to change notification settings - Fork 517
Closed
Labels
Area-IntelliSenseBug: PowerShell CoreBugs when using PowerShell Core.Bugs when using PowerShell Core.Issue-EnhancementA feature request (enhancement).A feature request (enhancement).
Description
VSCode Version: 1.40.1
OS Version: Windows 10, 1903
Powershell Extension: 2019.11.0
Steps to Reproduce:
Create an Enum
Create a function which references that Enum as a parameter.
Call that function, there will be no autosense when populating the parameters and values for said function.
Simple Example
Enum AzureSqlEdition
{
Standard
Premium
Basic
}
function functAutoSenseBroke
{
param
(
[Parameter(Mandatory=$True)][AzureSqlEdition]$DbType,
[Parameter(Mandatory=$True)][string]$OtherParameter
)
Write-Host $DbType
Write-Host $OtherParameter
}
function functAutoSenseWorks
{
param ( [Parameter(Mandatory=$True)][string]$DbType )
Write-Host $DbType
}
#works but no autosense
functAutoSenseBroke -DbType ([AzureSqlEdition]::Standard) -OtherParameter "other"
#Simple Function, no Enum, autosense works, for comparison purposes
functAutoSenseWorks -DbType "test"
Metadata
Metadata
Assignees
Labels
Area-IntelliSenseBug: PowerShell CoreBugs when using PowerShell Core.Bugs when using PowerShell Core.Issue-EnhancementA feature request (enhancement).A feature request (enhancement).