Skip to content

Commit 09c5212

Browse files
committed
C#: Account for explicit interface implementations in OperatorSymbol
1 parent d7eeb1f commit 09c5212

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

csharp/extractor/Semmle.Extraction.CSharp/Entities/UserOperator.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,9 @@ public static bool OperatorSymbol(string methodName, out string operatorName)
178178
/// <returns>The converted name.</returns>
179179
private static string OperatorSymbol(Context cx, IMethodSymbol method)
180180
{
181+
if (method.ExplicitInterfaceImplementations.Any())
182+
return OperatorSymbol(cx, method.ExplicitInterfaceImplementations.First());
183+
181184
var methodName = method.Name;
182185
if (!OperatorSymbol(methodName, out var result))
183186
cx.ModelError(method, $"Unhandled operator name in OperatorSymbol(): '{methodName}'");

0 commit comments

Comments
 (0)