dotnet/roslyn

Confusing error message when the target member cannot be located for an explicit interface implementation

Open

#38,467 opened on Sep 3, 2019

View on GitHub
 (1 comment) (0 reactions) (0 assignees)C# (4,257 forks)batch import
Area-CompilersBugConcept-Diagnostic ClarityLanguage-C#help wanted

Repository metrics

Stars
 (20,414 stars)
PR merge metrics
 (Avg merge 6d 17h) (256 merged PRs in 30d)

Description

interface I100 { }

class C100 : I100
{
    object I100.M4() => null;
}

Observed:

 error CS0539: 'C100.M4()' in explicit interface declaration is not found among members of the interface that can be implemented

But C100 doesn't have member named M4.

Contributor guide