Skip to content

Commit 197d34e

Browse files
committed
Add object type to methodbind
1 parent 43a1c67 commit 197d34e

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

src/runtime/methodbinder.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,7 @@ internal Binding Bind(IntPtr inst, IntPtr args, IntPtr kw, MethodBase info, Meth
375375
if (clrtype != null)
376376
{
377377
var typematch = false;
378-
if (pi[n].ParameterType != clrtype)
378+
if ((pi[n].ParameterType != typeof(object)) && (pi[n].ParameterType != clrtype))
379379
{
380380
IntPtr pytype = Converter.GetPythonTypeByAlias(pi[n].ParameterType);
381381
pyoptype = Runtime.PyObject_Type(op);

src/tests/test_method.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -781,7 +781,6 @@ def test_no_object_in_param():
781781
MethodTest.TestOverloadedNoObject("test")
782782

783783

784-
@pytest.mark.xfail(reason="Needs fixing. #203")
785784
def test_object_in_param():
786785
"""Test regression introduced by #151 in which Object method overloads
787786
aren't being used. See #203 for issue."""

0 commit comments

Comments
 (0)