-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Fix static method invocation type inference #8018
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
Fix static method invocation type inference #8018
Conversation
|
Looking into test failures. Also will move tests to the type inference section that I missed. Moving to WIP |
|
Alright it's ready. I'm fairly certain that test failure isn't related, but if I'm wrong let me know and I'll look into it. |
|
@SeeminglyScience Seems test failure is related to your change. You could add a test from original Issue to TabCompletion.Tests.ps1 |
|
Oh okay, I originally read the failure message backwards. It looks like the change catches an additional property that was previously missed. I'll change that test to include the missed property and a add test for the original example as well. |
|
@SeeminglyScience Thanks for your contribution! |
PR Summary
Added handling for
PSMethodobjects inTryGetTypeFromMember. This fixes type inference for static method invocations (e.g.[powershell]::Create()).Resolves #7820
I wasn't able to find any tests for member completion so I added a few as well along with the test case for the resolved issue.
PR Checklist
.h,.cpp,.cs,.ps1and.psm1files have the correct copyright headerWIP:to the beginning of the title and remove the prefix when the PR is ready.[feature]if the change is significant or affects feature tests