Steps to reproduce
$script = '[powershell]::Create().'
$results = TabExpansion2 -inputScript $script -cursorColumn $script.Length
$results.CompletionMatches[0]
Expected behavior
Returns completion results for an instance member of the PowerShell class.
CompletionText ListItemText ResultType ToolTip
-------------- ------------ ---------- -------
Commands Commands Property System.Management.Automation.PSCommand Commands { get; set; }
Actual behavior
Nothing is returned.
Environment data
> $PSVersionTable
Name Value
---- -----
PSVersion 6.1.0
PSEdition Core
GitCommitId 6.1.0
OS Microsoft Windows 10.0.17134
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Additional Info
The AddMembersByInferredTypesClrType method adds static members as PSMethod objects but TryGetTypeFromMember expects CLR methods as MethodCacheEntry objects.
Steps to reproduce
Expected behavior
Returns completion results for an instance member of the
PowerShellclass.Actual behavior
Nothing is returned.
Environment data
Additional Info
The
AddMembersByInferredTypesClrTypemethod adds static members asPSMethodobjects butTryGetTypeFromMemberexpects CLR methods asMethodCacheEntryobjects.