Skip to content

The completion list for generic constraints has strange inclusions and omissions #30784

@jhinder

Description

@jhinder

Version Used: VS 15.8.8 (Roslyn 2.9.0.63208)

Steps to Reproduce:

  1. Paste the following code into a C# file.
  2. Invoke the completion list at the marked location.
void M<T>() where T : $$

Expected Behavior: Only valid keywords (class, new, struct, unmanaged), valid types (classes, interfaces), other generic types, and namespaces appear in the list.

Actual Behavior: Of the allowed keywords, only new and unmanaged appear in the list. On the other hand, the list does include snippets, as well as struct, delegate and enum types, none of which are (as of C# 7.3) valid constraint types.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area-IDEBughelp wantedThe issue is "up for grabs" - add a comment if you are interested in working on it

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions