Skip to content

Completion still suggests items that do not satisfy generic constraint #76986

@gulbanana

Description

@gulbanana

Image

There's a long-standing issue using the Azure SDK wherein the extension method AddBlobServiceClient() is shown in intellisense for all objects, even object. Here's its definition:

public static IAzureClientBuilder<BlobServiceClient, BlobClientOptions> AddBlobServiceClient<TBuilder>(this TBuilder builder, string connectionString)
            where TBuilder : IAzureClientFactoryBuilder

And the Azure SDK issue: Azure/azure-sdk-for-net#15608

This was closed as a Roslyn bug: #39689

...but that bug was also closed by this PR: #65225

Unfortunately, it doesn't seem to have resolved the problem in practice. I've uploaded a minimal repro to https://github.com/gulbanana-bugs/repro-blob-extensions.

Metadata

Metadata

Assignees

Labels

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

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions