Title: Type inference should handle [ref] · Issue #18759 · PowerShell/PowerShell · GitHub
Open Graph Title: Type inference should handle [ref] · Issue #18759 · PowerShell/PowerShell
X Title: Type inference should handle [ref] · Issue #18759 · PowerShell/PowerShell
Description: Summary of the new feature / enhancement Some .NET methods use "out" to return a value to variables, in PowerShell we can use [ref] to capture that output like this: $Tokens = $null $Errors = $null $Ast = [System.Management.Automation.La...
Open Graph Description: Summary of the new feature / enhancement Some .NET methods use "out" to return a value to variables, in PowerShell we can use [ref] to capture that output like this: $Tokens = $null $Errors = $null...
X Description: Summary of the new feature / enhancement Some .NET methods use "out" to return a value to variables, in PowerShell we can use [ref] to capture that output like this: $Tokens = $null $Erro...
Opengraph URL: https://github.com/PowerShell/PowerShell/issues/18759
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Type inference should handle [ref]","articleBody":"### Summary of the new feature / enhancement\n\nSome .NET methods use \"out\" to return a value to variables, in PowerShell we can use `[ref]` to capture that output like this:\r\n```\r\n$Tokens = $null\r\n$Errors = $null\r\n$Ast = [System.Management.Automation.Language.Parser]::ParseInput(\"Hello\", [ref] $Tokens, [ref] $Errors)\r\n```\r\nThe type inference should be able to detect this and infer the type for such variables.\n\n### Proposed technical implementation details (optional)\n\n_No response_","author":{"url":"https://github.com/MartinGC94","@type":"Person","name":"MartinGC94"},"datePublished":"2022-12-09T13:43:28.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":13},"url":"https://github.com/18759/PowerShell/issues/18759"}
| 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:fbb024bc-fe28-db52-6128-91459d5bb70b |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | BDD8:1F9AF:1EDFAE:2B04D0:6A547CFF |
| html-safe-nonce | 1d40706750ed3397368b35c37246457fb59483ef03c52eb343f3be2750a6963f |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCREQ4OjFGOUFGOjFFREZBRToyQjA0RDA6NkE1NDdDRkYiLCJ2aXNpdG9yX2lkIjoiNzE2Mjc0Nzk2NjY5MjAzMTc0MyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | eeee2ee281da025d9af01a58422ea67ca2f2cdf0f8b09813cda023fd1c91a353 |
| hovercard-subject-tag | issue:1486786194 |
| 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/18759/issue_layout |
| twitter:image | https://opengraph.githubassets.com/d1e9004867660dcf150e86bfd3fd028f4caedbb84e53ef0f3fdcf8415da310ed/PowerShell/PowerShell/issues/18759 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/d1e9004867660dcf150e86bfd3fd028f4caedbb84e53ef0f3fdcf8415da310ed/PowerShell/PowerShell/issues/18759 |
| og:image:alt | Summary of the new feature / enhancement Some .NET methods use "out" to return a value to variables, in PowerShell we can use [ref] to capture that output like this: $Tokens = $null $Errors = $null... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | MartinGC94 |
| hostname | github.com |
| expected-hostname | github.com |
| None | b9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb |
| 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 | 6d28624802c2f7d9500239dd6870ed7031b7353b |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width