Skip to content

Commit 7f2fb2e

Browse files
committed
C#: Use the generic version of the associated implementation.
1 parent 769b195 commit 7f2fb2e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

csharp/extractor/Semmle.Extraction.CSharp/CodeAnalysisExtensions/SymbolExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -664,7 +664,7 @@ public static bool IsCompilerGeneratedExtensionMethod(this IMethodSymbol method)
664664
// Find the (possibly unbound) original extension method that maps to this implementation (if any).
665665
var unboundDeclaration = extensions.SelectMany(e => e.GetMembers())
666666
.OfType<IMethodSymbol>()
667-
.FirstOrDefault(m => SymbolEqualityComparer.Default.Equals(m.AssociatedExtensionImplementation, method.ConstructedFrom));
667+
.FirstOrDefault(m => SymbolEqualityComparer.Default.Equals(m.AssociatedExtensionImplementation?.ConstructedFrom, method.ConstructedFrom));
668668

669669
var isFullyConstructed = method.IsBoundGenericMethod();
670670
if (isFullyConstructed && unboundDeclaration?.ContainingType is INamedTypeSymbol extensionType)

0 commit comments

Comments
 (0)