Title: A malformed type literal passed to the -is or -as operator is quietly ignored at the prompt · Issue #11428 · PowerShell/PowerShell · GitHub
Open Graph Title: A malformed type literal passed to the -is or -as operator is quietly ignored at the prompt · Issue #11428 · PowerShell/PowerShell
X Title: A malformed type literal passed to the -is or -as operator is quietly ignored at the prompt · Issue #11428 · PowerShell/PowerShell
Description: Note that the problem only surfaces at the interactive prompt, whether or not PSReadLine is loaded. In a script / script block, an error occurs, as expected. This is a regression from v6.2.3 / WinPS. Steps to reproduce Submit at the prom...
Open Graph Description: Note that the problem only surfaces at the interactive prompt, whether or not PSReadLine is loaded. In a script / script block, an error occurs, as expected. This is a regression from v6.2.3 / WinP...
X Description: Note that the problem only surfaces at the interactive prompt, whether or not PSReadLine is loaded. In a script / script block, an error occurs, as expected. This is a regression from v6.2.3 / WinP...
Opengraph URL: https://github.com/PowerShell/PowerShell/issues/11428
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"A malformed type literal passed to the -is or -as operator is quietly ignored at the prompt","articleBody":"Note that the problem only surfaces _at the interactive prompt_, whether or not PSReadLine is loaded.\r\n\r\nIn a _script_ / script block, an error occurs, as expected.\r\n\r\nThis is a regression from v6.2.3 / WinPS.\r\n\r\n\r\n\r\n# Steps to reproduce\r\n\r\nSubmit _at the prompt_:\r\n\r\n```powershell\r\n'foo' -is [string \r\n'foo' -as [string \r\n```\r\n\r\n# Expected behavior\r\n\r\nA statement-terminating error with message:\r\n\r\n```\r\nMissing ] at end of attribute or type literal.\r\n```\r\n\r\n# Actual behavior\r\n\r\nBoth commands fail quietly, and `$?` even contains `$true`.\r\n\r\n# Environment data\r\n\r\n```none\r\nPowerShell Core 7.0.0-rc.1\r\n```\r\n","author":{"url":"https://github.com/mklement0","@type":"Person","name":"mklement0"},"datePublished":"2019-12-23T23:38:08Z","url":"https://github.com/PowerShell/PowerShell/issues/11428"}
| 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:8999778b-cf5b-29ae-ab96-74d670eab16c |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | DFC0:2ACF16:1CC6B3:277B56:6AFD506E |
| html-safe-nonce | 88873e189324081f88078ee65187c13b3bf81f47d6d900a516592799f0f0f1d6 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJERkMwOjJBQ0YxNjoxQ0M2QjM6Mjc3QjU2OjZBRkQ1MDZFIiwidmlzaXRvcl9pZCI6IjY4MTYyNDQxMTQyMjkzODMyNzgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 55b3a4e6df9b2480a394b102a5bbb22bdbb4fa372d7365b83dc2a4577137e18c |
| hovercard-subject-tag | issue:541935516 |
| 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/11428/issue_layout |
| twitter:image | https://opengraph.githubassets.com/8b2b392bbaff6419cba4c98a12e1080032a1a6eb3e81360099e6a143c9f5d8e8/PowerShell/PowerShell/issues/11428 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/8b2b392bbaff6419cba4c98a12e1080032a1a6eb3e81360099e6a143c9f5d8e8/PowerShell/PowerShell/issues/11428 |
| og:image:alt | Note that the problem only surfaces at the interactive prompt, whether or not PSReadLine is loaded. In a script / script block, an error occurs, as expected. This is a regression from v6.2.3 / WinP... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | mklement0 |
| hostname | github.com |
| expected-hostname | github.com |
| None | 66653c2e55a6fff2930be1bdf07ee4f8aa137e3956d056c822563be6f878755e |
| 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 | b6f01f7cb9f35f8c09949773241a3d49dd04b340 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width