File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -200,13 +200,13 @@ private static int GetPrecedence(MethodInformation methodInformation)
200200 val += mi . IsGenericMethod ? 1 : 0 ;
201201 for ( var i = 0 ; i < num ; i ++ )
202202 {
203- val += ArgPrecedence ( pi [ i ] . ParameterType ) ;
203+ val += ArgPrecedence ( pi [ i ] . ParameterType , methodInformation ) ;
204204 }
205205
206206 var info = mi as MethodInfo ;
207207 if ( info != null )
208208 {
209- val += ArgPrecedence ( info . ReturnType ) ;
209+ val += ArgPrecedence ( info . ReturnType , methodInformation ) ;
210210 val += mi . DeclaringType == mi . ReflectedType ? 0 : 3000 ;
211211 }
212212
@@ -216,15 +216,15 @@ private static int GetPrecedence(MethodInformation methodInformation)
216216 /// <summary>
217217 /// Return a precedence value for a particular Type object.
218218 /// </summary>
219- internal static int ArgPrecedence ( Type t )
219+ internal static int ArgPrecedence ( Type t , MethodInformation mi )
220220 {
221221 Type objectType = typeof ( object ) ;
222222 if ( t == objectType )
223223 {
224224 return 3000 ;
225225 }
226226
227- if ( t . IsAssignableFrom ( typeof ( PyObject ) ) )
227+ if ( t . IsAssignableFrom ( typeof ( PyObject ) ) && ! OperatorMethod . IsOperatorMethod ( mi . MethodBase ) )
228228 {
229229 return - 1 ;
230230 }
@@ -283,7 +283,7 @@ internal static int ArgPrecedence(Type t)
283283 {
284284 return 2500 ;
285285 }
286- return 100 + ArgPrecedence ( e ) ;
286+ return 100 + ArgPrecedence ( e , mi ) ;
287287 }
288288
289289 return 2000 ;
You can’t perform that action at this time.
0 commit comments