-
Notifications
You must be signed in to change notification settings - Fork 8k
Closed
Labels
Issue-Questionideally support can be provided via other mechanisms, but sometimes folks do open an issue to get aideally support can be provided via other mechanisms, but sometimes folks do open an issue to get aResolution-FixedThe issue is fixed.The issue is fixed.WG-Enginecore PowerShell engine, interpreter, and runtimecore PowerShell engine, interpreter, and runtime
Description
Steps to reproduce
In PS 6 and below if a class has only hidden params it will show the ToString() output like it do when there are no parameters. If there are non hiden params it shows them instead.
In PS 7 if a class has only hidden params it shows blank lines.
class Empty {
MyClass() { }
[String]ToString() { return 'MyString' }
}
[Empty]::new()
# Will Show "MyString"
class Hidden {
hidden $Param = 'Foo'
MyClass() { }
[String]ToString() { return 'MyString' }
}
[Hidden]::new()
# On PS < 7 Will Show "MyString"
# On PS 7 Will Show "2 blank lines"
class Params {
$Param = 'Foo'
MyClass() { }
[String]ToString() { return 'MyString' }
}
[Params]::new()
<# Will Show:
Param
-----
Foo
#>
Expected behavior
If there are only hidden params show the ToString() like in PS6
Actual behavior
If there are only hidden params it shows blank lines like it tries to show the params but have noting to show.
Metadata
Metadata
Assignees
Labels
Issue-Questionideally support can be provided via other mechanisms, but sometimes folks do open an issue to get aideally support can be provided via other mechanisms, but sometimes folks do open an issue to get aResolution-FixedThe issue is fixed.The issue is fixed.WG-Enginecore PowerShell engine, interpreter, and runtimecore PowerShell engine, interpreter, and runtime