PowerShell / PowerShell Public
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
Improve type inference and completions #16963
base: master
Are you sure you want to change the base?
Conversation
|
The |
If it is persistent on CI you can temporary add test code (in tests or Engine itself) :-) |
|
Looks like I was right about that test but now a different unrelated test is failing... |
But the test doesn't fail on other PRs or daily builds. |
|
This PR has Quantification details
Why proper sizing of changes matters
Optimal pull request sizes drive a better predictable PR flow as they strike a
What can I do to optimize my changes
How to interpret the change counts in git diff output
Was this comment helpful? |
|
These are the 3 runs I've had on this PR:
First run had the Enum out of range error due to bad RNG luck. The next 2 runs replaced that error with a different error The tabexpansion error that is there in all 3 runs is perfectly legit but like I said earlier it only exists because the test is designed around type inference not working. We need a different test to test if the completion code is correctly blocked from doing conversions. |
|
Yes, I see the same errors in other PRs. |
|
This pull request has been automatically marked as Review Needed because it has been there has not been any activity for 7 days. |

Formed in 2009, the Archive Team (not to be confused with the archive.org Archive-It Team) is a rogue archivist collective dedicated to saving copies of rapidly dying or deleted websites for the sake of history and digital heritage. The group is 100% composed of volunteers and interested parties, and has expanded into a large amount of related projects for saving online and digital history.

PR Summary
Fixes #15811
Fixes #9949
Fixes #11803
Fixes #15885
Fixes #17257
Improves the type inference in the following scenarios:
[System.Collections.Generic.IList[System.Text.StringBuilder]]$null)[0]($var -as [ICloneable])(Note it only works with type literals, it still doesn't work with other expression types)(0..10).ForEach{$_}Improves tab completion in the following ways:
ForEach-Object -MemberName([void]("")).Fixes a failed assertion due to a missing null check.
PR Context
PR Checklist
.h,.cpp,.cs,.ps1and.psm1files have the correct copyright headerWIP:or[ WIP ]to the beginning of the title (theWIPbot will keep its status check atPendingwhile the prefix is present) and remove the prefix when the PR is ready.(which runs in a different PS Host).