Skip to content

OutputType(typeof(void)) decorations should not produce inferred members #17257

@SeeminglyScience

Description

@SeeminglyScience

Steps to reproduce

function test {
    [OutputType([void])]
    [CmdletBinding()]
    param()
}

TabExpansion2 -inputScript ($s = '(test).') -cursorColumn $s.Length | % CompletionMatches

Expected behavior

<no results>

Actual behavior

CompletionText ListItemText ResultType ToolTip
-------------- ------------ ---------- -------
Equals(        Equals           Method bool Equals(System.Object obj)
GetHashCode(   GetHashCode      Method int GetHashCode()
GetType(       GetType          Method type GetType()
ToString(      ToString         Method string ToString()

Environment data

Name                           Value
----                           -----
PSVersion                      7.3.0-preview.3
PSEdition                      Core
GitCommitId                    7.3.0-preview.3
OS                             Microsoft Windows 10.0.19044
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions