@@ -718,7 +718,7 @@ internal Binding Bind(BorrowedReference inst, BorrowedReference args, BorrowedRe
718718 }
719719 }
720720
721- var match = new MatchedMethod ( kwargsMatched , margs , outs , mi ) ;
721+ var match = new MatchedMethod ( kwargsMatched , margs , outs , methodInformation ) ;
722722 if ( usedImplicitConversion )
723723 {
724724 if ( matchesUsingImplicitConversion == null )
@@ -750,7 +750,7 @@ internal Binding Bind(BorrowedReference inst, BorrowedReference args, BorrowedRe
750750 . GroupBy ( x => x . KwargsMatched )
751751 . OrderByDescending ( x => x . Key )
752752 . First ( )
753- . MinBy ( x => GetMatchedArgumentsPrecedence ( methods . First ( m => m . MethodBase == x . Method ) , pyArgCount , kwArgDict ? . Keys ) ) ;
753+ . MinBy ( x => GetMatchedArgumentsPrecedence ( x . MethodInformation , pyArgCount , kwArgDict ? . Keys ) ) ;
754754
755755 var margs = bestMatch . ManagedArgs ;
756756 var outs = bestMatch . Outs ;
@@ -1116,14 +1116,15 @@ private readonly struct MatchedMethod
11161116 public int KwargsMatched { get ; }
11171117 public object ? [ ] ManagedArgs { get ; }
11181118 public int Outs { get ; }
1119- public MethodBase Method { get ; }
1119+ public MethodInformation MethodInformation { get ; }
1120+ public MethodBase Method => MethodInformation . MethodBase ;
11201121
1121- public MatchedMethod ( int kwargsMatched , object ? [ ] margs , int outs , MethodBase mb )
1122+ public MatchedMethod ( int kwargsMatched , object ? [ ] margs , int outs , MethodInformation methodInformation )
11221123 {
11231124 KwargsMatched = kwargsMatched ;
11241125 ManagedArgs = margs ;
11251126 Outs = outs ;
1126- Method = mb ;
1127+ MethodInformation = methodInformation ;
11271128 }
11281129 }
11291130
0 commit comments