Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add type accelerator for ordered #17804

Merged
merged 1 commit into from
Aug 1, 2022

Conversation

fflaten
Copy link
Contributor

@fflaten fflaten commented Jul 29, 2022

PR Summary

Adds a type accelerator for [ordered]-> [OrderedDictionary] to enables use of -is, -as and [ordered]::new().

Special OrderedAttribute parser-logic that limits it to only allow cast from hash-literal when used like [ordered]$myVar is kept per WG-decision, see comment in related issue.

PR Context

Fix #10513

PR Checklist

@fflaten fflaten requested a review from daxian-dbw as a code owner July 29, 2022 23:15
@ghost ghost assigned TravisEz13 Jul 29, 2022
@fflaten
Copy link
Contributor Author

fflaten commented Jul 29, 2022

Tested with vscode-powershell. When writing [ord, IntelliSense shows OrderedDictionary as primary suggestion when using pwsh devbuild.

@iSazonov iSazonov requested a review from vexx32 July 31, 2022 13:15
@iSazonov iSazonov added the CL-General Indicates that a PR should be marked as a general cmdlet change in the Change Log label Jul 31, 2022
@daxian-dbw daxian-dbw merged commit 0d52375 into PowerShell:master Aug 1, 2022
@fflaten fflaten deleted the ordered-typeacc branch August 1, 2022 16:18
@ghost
Copy link

ghost commented Aug 12, 2022

🎉v7.3.0-preview.7 has been released which incorporates this pull request.:tada:

Handy links:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CL-General Indicates that a PR should be marked as a general cmdlet change in the Change Log
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature Request: add [Ordered] type accelerator
5 participants