mirror of
https://github.com/github/codeql.git
synced 2026-04-22 15:25:18 +02:00
Merge pull request #13384 from tamasvajk/fix/standalone-explicit-interface-error
C#: Improve error message for missing explicit interface implementation
This commit is contained in:
@@ -243,7 +243,12 @@ namespace Semmle.Extraction.CSharp.Entities
|
||||
if (methodKind == MethodKind.ExplicitInterfaceImplementation)
|
||||
{
|
||||
// Retrieve the original method kind
|
||||
methodKind = methodDecl.ExplicitInterfaceImplementations.Select(m => m.MethodKind).FirstOrDefault();
|
||||
if (methodDecl.ExplicitInterfaceImplementations.IsEmpty)
|
||||
{
|
||||
throw new InternalError(methodDecl, "Couldn't get the original method kind for an explicit interface implementation");
|
||||
}
|
||||
|
||||
methodKind = methodDecl.ExplicitInterfaceImplementations.Select(m => m.MethodKind).First();
|
||||
}
|
||||
|
||||
switch (methodKind)
|
||||
|
||||
Reference in New Issue
Block a user