Skip to content

Completion provider: Completion based on element type name is missing if type needs to be inferred (var) #27138

@MaStr11

Description

@MaStr11

PR #22673 introduces support for code completion for tuples. This issue documents a missing piece in the completion. The following test fails (action is not suggested). It was written here

        [WorkItem(22342, "https://github.com/dotnet/roslyn/issues/22342")]
        [Fact(Trait(Traits.Feature, Traits.Features.Completion)]
        public async void TupleElementTypeInference()
        {
            var markup = @"
class Test
{
    void Do()
    {
        (var accessViolationException, var $$) = (new AccessViolationException(), new Action(() => { }));
    }
}
";
            await VerifyItemExistsAsync(markup, "action");
        }

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area-IDEFeature Requesthelp 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