dotnet/roslyn

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

Aperta

#38.467 aperta il 3 set 2019

 (1 commento) (0 reazioni) (0 assegnatari)C# (4257 fork)batch import
Area-CompilersBugConcept-Diagnostic ClarityLanguage-C#help wanted

Metriche repository

Star
 (20.414 stelle)
Metriche merge PR
 (Merge medio 6g 17h) (256 PR mergiate in 30 g)

Descrizione

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.

Guida contributor