-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Closed
Labels
First-Time-IssueEasy issues first time contributors can work on to learn about this projectEasy issues first time contributors can work on to learn about this projectIssue-Enhancementthe issue is more of a feature request than a bugthe issue is more of a feature request than a bugUp-for-GrabsUp-for-grabs issues are not high priorities, and may be opportunities for external contributorsUp-for-grabs issues are not high priorities, and may be opportunities for external contributorsWG-Enginecore PowerShell engine, interpreter, and runtimecore PowerShell engine, interpreter, and runtimeWG-Interactive-IntelliSensetab completiontab completion
Description
Steps to reproduce
function Test-BadAttribute
{
[CmdletBinding()]
Param
(
# Param1 help description
[Parameter]
[ValidateSet("a","b")]
$Param1,
[Parameter]
[ValidateSet()] # Bad attribute - the constructor is failed
$Param2
)
Begin
{
}
Process
{
}
End
{
}
}
1. Test-BadAttribute -Param1 <Press Tab>
2. Test-BadAttribute -Param1 <Press Enter>
3. Test-BadAttribute -Param1 "a" <Press Enter>Expected behavior
- IntelliSenese work for Param1 and don't work for Param2 with error message
or IntelliSenese don't work for both parameters with appropriate error message. - Show appropriate error message.
- Cmdlet work well or don't work with showing appropriate error message.
Actual behavior
- No exception. No error message. IntelliSense don't work.
- Murky error message: it is impossible to understand that there is a problem with any attribute, which is the attribute and which is the parameter.
- The same as 2. and the cmdlet don't work.
Environment data
> $PSVersionTable
Name Value
---- -----
PSVersion 6.0.0-beta
PSEdition Core
BuildVersion 3.0.0.0
CLRVersion
GitCommitId v6.0.0-beta.1-7-g7fa53aedb3c7514cf1c2a19af6c26566661596d9-dirty
OS Microsoft Windows 10.0.10240
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0alx9r
Metadata
Metadata
Assignees
Labels
First-Time-IssueEasy issues first time contributors can work on to learn about this projectEasy issues first time contributors can work on to learn about this projectIssue-Enhancementthe issue is more of a feature request than a bugthe issue is more of a feature request than a bugUp-for-GrabsUp-for-grabs issues are not high priorities, and may be opportunities for external contributorsUp-for-grabs issues are not high priorities, and may be opportunities for external contributorsWG-Enginecore PowerShell engine, interpreter, and runtimecore PowerShell engine, interpreter, and runtimeWG-Interactive-IntelliSensetab completiontab completion