Can't directly construct a generic list from a Boolean scalar #17731
Labels
Issue-Bug
Issue has been identified as a bug in the product
Up-for-Grabs
Up-for-grabs issues are not high priorities, and may be opportunities for external contributors
WG-Engine
core PowerShell engine, interpreter, and runtime
Steps to reproduce
These statements return an error:
While these statements work fine:
Expected behavior
All statements to return a generic list with a single (boolean) item without any error
Actual behavior
Statements that have a single boolean as constructor parameter produce an error
Error details
Workaround:
Use the Array subexpression operator
@( )
:Environment data
The text was updated successfully, but these errors were encountered: