Title: Write-Output of class with hidden params regression in PS 7 · Issue #10554 · PowerShell/PowerShell · GitHub
Open Graph Title: Write-Output of class with hidden params regression in PS 7 · Issue #10554 · PowerShell/PowerShell
X Title: Write-Output of class with hidden params regression in PS 7 · Issue #10554 · PowerShell/PowerShell
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 pa...
Open Graph 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 instea...
X 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 instea...
Opengraph URL: https://github.com/PowerShell/PowerShell/issues/10554
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Write-Output of class with hidden params regression in PS 7","articleBody":"# Steps to reproduce\r\nIn 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.\r\nIn PS 7 if a class has only hidden params it shows blank lines.\r\n```powershell\r\nclass Empty {\r\n MyClass() { }\r\n [String]ToString() { return 'MyString' }\r\n}\r\n[Empty]::new()\r\n# Will Show \"MyString\"\r\n\r\nclass Hidden {\r\n hidden $Param = 'Foo'\r\n MyClass() { }\r\n [String]ToString() { return 'MyString' }\r\n}\r\n[Hidden]::new()\r\n# On PS \u003c 7 Will Show \"MyString\"\r\n# On PS 7 Will Show \"2 blank lines\"\r\n\r\nclass Params {\r\n $Param = 'Foo'\r\n MyClass() { }\r\n [String]ToString() { return 'MyString' }\r\n}\r\n[Params]::new()\r\n\u003c# Will Show:\r\nParam\r\n-----\r\nFoo\r\n#>\r\n```\r\n\r\n# Expected behavior\r\nIf there are only hidden params show the ToString() like in PS6\r\n\r\n# Actual behavior\r\nIf there are only hidden params it shows blank lines like it tries to show the params but have noting to show.","author":{"url":"https://github.com/ili101","@type":"Person","name":"ili101"},"datePublished":"2019-09-16T23:18:53Z","url":"https://github.com/PowerShell/PowerShell/issues/10554"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:9a40fa3d-2ed3-56be-34a7-da72d939b586 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | BE34:265399:59A0D:79D30:6AFD48A4 |
| html-safe-nonce | ada55b56d6a1ed89ad9aa068a1c20ca7380976157da3464e2a344ef5fce9c6ca |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCRTM0OjI2NTM5OTo1OUEwRDo3OUQzMDo2QUZENDhBNCIsInZpc2l0b3JfaWQiOiIzMTc5Njg5MDMzMDI4OTE2ODQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 44809a76b37afdc0daf2c5a2a02d70e369d2e7c613f96e63b554feffe1e079b2 |
| hovercard-subject-tag | issue:494321543 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/PowerShell/PowerShell/10554/issue_layout |
| twitter:image | https://opengraph.githubassets.com/257b805b94f2dec6c1ed55e30f5099dc50e04a7d6a5ba49c8635c01f1012f662/PowerShell/PowerShell/issues/10554 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/257b805b94f2dec6c1ed55e30f5099dc50e04a7d6a5ba49c8635c01f1012f662/PowerShell/PowerShell/issues/10554 |
| og:image:alt | 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 instea... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | ili101 |
| hostname | github.com |
| expected-hostname | github.com |
| None | bdbacc25b921224ff0befcb9e629560a1255be51aec9991d6e3f95b5e9151474 |
| turbo-cache-control | no-preview |
| go-import | github.com/PowerShell/PowerShell git https://github.com/PowerShell/PowerShell.git |
| octolytics-dimension-user_id | 11524380 |
| octolytics-dimension-user_login | PowerShell |
| octolytics-dimension-repository_id | 49609581 |
| octolytics-dimension-repository_nwo | PowerShell/PowerShell |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 49609581 |
| octolytics-dimension-repository_network_root_nwo | PowerShell/PowerShell |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 556dd37bb0aceffb25724e151b5d858b3265b40b |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width