Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Add type accelerator for ordered#17804

Merged
daxian-dbw merged 1 commit into
PowerShell:masterPowerShell/PowerShell:masterfrom
fflaten:ordered-typeaccfflaten/PowerShell:ordered-typeaccCopy head branch name to clipboard
Aug 1, 2022
Merged

Add type accelerator for ordered#17804
daxian-dbw merged 1 commit into
PowerShell:masterPowerShell/PowerShell:masterfrom
fflaten:ordered-typeaccfflaten/PowerShell:ordered-typeaccCopy head branch name to clipboard

Conversation

@fflaten

@fflaten fflaten commented Jul 29, 2022

Copy link
Copy Markdown
Contributor

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

fflaten commented Jul 29, 2022

Copy link
Copy Markdown
Contributor Author

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

ghost commented Aug 12, 2022

Copy link
Copy Markdown

🎉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

Morty Proxy This is a proxified and sanitized view of the page, visit original site.