@@ -718,7 +718,7 @@ internal Binding Bind(BorrowedReference inst, BorrowedReference args, BorrowedRe
718
718
}
719
719
}
720
720
721
- var match = new MatchedMethod ( kwargsMatched , margs , outs , mi ) ;
721
+ var match = new MatchedMethod ( kwargsMatched , margs , outs , methodInformation ) ;
722
722
if ( usedImplicitConversion )
723
723
{
724
724
if ( matchesUsingImplicitConversion == null )
@@ -750,7 +750,7 @@ internal Binding Bind(BorrowedReference inst, BorrowedReference args, BorrowedRe
750
750
. GroupBy ( x => x . KwargsMatched )
751
751
. OrderByDescending ( x => x . Key )
752
752
. First ( )
753
- . MinBy ( x => GetMatchedArgumentsPrecedence ( methods . First ( m => m . MethodBase == x . Method ) , pyArgCount , kwArgDict ? . Keys ) ) ;
753
+ . MinBy ( x => GetMatchedArgumentsPrecedence ( x . MethodInformation , pyArgCount , kwArgDict ? . Keys ) ) ;
754
754
755
755
var margs = bestMatch . ManagedArgs ;
756
756
var outs = bestMatch . Outs ;
@@ -1116,14 +1116,15 @@ private readonly struct MatchedMethod
1116
1116
public int KwargsMatched { get ; }
1117
1117
public object ? [ ] ManagedArgs { get ; }
1118
1118
public int Outs { get ; }
1119
- public MethodBase Method { get ; }
1119
+ public MethodInformation MethodInformation { get ; }
1120
+ public MethodBase Method => MethodInformation . MethodBase ;
1120
1121
1121
- public MatchedMethod ( int kwargsMatched , object ? [ ] margs , int outs , MethodBase mb )
1122
+ public MatchedMethod ( int kwargsMatched , object ? [ ] margs , int outs , MethodInformation methodInformation )
1122
1123
{
1123
1124
KwargsMatched = kwargsMatched ;
1124
1125
ManagedArgs = margs ;
1125
1126
Outs = outs ;
1126
- Method = mb ;
1127
+ MethodInformation = methodInformation ;
1127
1128
}
1128
1129
}
1129
1130
0 commit comments