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.
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.
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.