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)
200
200
val += mi . IsGenericMethod ? 1 : 0 ;
201
201
for ( var i = 0 ; i < num ; i ++ )
202
202
{
203
- val += ArgPrecedence ( pi [ i ] . ParameterType ) ;
203
+ val += ArgPrecedence ( pi [ i ] . ParameterType , methodInformation ) ;
204
204
}
205
205
206
206
var info = mi as MethodInfo ;
207
207
if ( info != null )
208
208
{
209
- val += ArgPrecedence ( info . ReturnType ) ;
209
+ val += ArgPrecedence ( info . ReturnType , methodInformation ) ;
210
210
val += mi . DeclaringType == mi . ReflectedType ? 0 : 3000 ;
211
211
}
212
212
@@ -216,15 +216,15 @@ private static int GetPrecedence(MethodInformation methodInformation)
216
216
/// <summary>
217
217
/// Return a precedence value for a particular Type object.
218
218
/// </summary>
219
- internal static int ArgPrecedence ( Type t )
219
+ internal static int ArgPrecedence ( Type t , MethodInformation mi )
220
220
{
221
221
Type objectType = typeof ( object ) ;
222
222
if ( t == objectType )
223
223
{
224
224
return 3000 ;
225
225
}
226
226
227
- if ( t . IsAssignableFrom ( typeof ( PyObject ) ) )
227
+ if ( t . IsAssignableFrom ( typeof ( PyObject ) ) && ! OperatorMethod . IsOperatorMethod ( mi . MethodBase ) )
228
228
{
229
229
return - 1 ;
230
230
}
@@ -283,7 +283,7 @@ internal static int ArgPrecedence(Type t)
283
283
{
284
284
return 2500 ;
285
285
}
286
- return 100 + ArgPrecedence ( e ) ;
286
+ return 100 + ArgPrecedence ( e , mi ) ;
287
287
}
288
288
289
289
return 2000 ;
You can’t perform that action at this time.
0 commit comments