Skip to content

Add type accelerator for ordered#17804

Merged
daxian-dbw merged 1 commit intoPowerShell:masterfrom
fflaten:ordered-typeacc
Aug 1, 2022
Merged

Add type accelerator for ordered#17804
daxian-dbw merged 1 commit intoPowerShell:masterfrom
fflaten:ordered-typeacc

Conversation

@fflaten
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown

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