We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4497aa5 commit a4dec59Copy full SHA for a4dec59
csharp/extractor/Semmle.Extraction.CSharp/Entities/Method.cs
@@ -243,7 +243,12 @@ public static void AddExplicitInterfaceQualifierToId(Context cx, EscapingTextWri
243
if (methodKind == MethodKind.ExplicitInterfaceImplementation)
244
{
245
// Retrieve the original method kind
246
- methodKind = methodDecl.ExplicitInterfaceImplementations.Select(m => m.MethodKind).FirstOrDefault();
+ if (methodDecl.ExplicitInterfaceImplementations.IsEmpty)
247
+ {
248
+ throw new InternalError(methodDecl, $"Couldn't get the original method kind for explicit interface implementation");
249
+ }
250
+
251
+ methodKind = methodDecl.ExplicitInterfaceImplementations.Select(m => m.MethodKind).First();
252
}
253
254
switch (methodKind)
0 commit comments