Skip to content

Commit

Permalink
Use base definition to compare virtual overloads
Browse files Browse the repository at this point in the history
  • Loading branch information
glopesdev committed Jul 3, 2023
1 parent 89c7296 commit c9221c8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Bonsai.Core/Expressions/ExpressionBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -819,7 +819,9 @@ static CallCandidate OverloadResolution(IEnumerable<MethodBase> methods, params
return new CallCandidate
{
method = method,
declaringType = method.DeclaringType,
declaringType = method.IsVirtual
? ((MethodInfo)method).GetBaseDefinition().DeclaringType
: method.DeclaringType,
arguments = callArguments,
generic = method.IsGenericMethod,
expansion = ParamExpansionRequired(parameters, argumentTypes),
Expand Down

0 comments on commit c9221c8

Please sign in to comment.