summaryrefslogtreecommitdiff
path: root/tests/run/static_methods.pyx
diff options
context:
space:
mode:
Diffstat (limited to 'tests/run/static_methods.pyx')
-rw-r--r--tests/run/static_methods.pyx12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/run/static_methods.pyx b/tests/run/static_methods.pyx
index ba7df379d..6c485fac7 100644
--- a/tests/run/static_methods.pyx
+++ b/tests/run/static_methods.pyx
@@ -87,6 +87,10 @@ cdef class FromPxd:
cdef static_cdef(int* x):
return 'pxd_cdef', x[0]
+ @staticmethod
+ cdef static_cdef_with_implicit_object(obj):
+ return obj+1
+
def call_static_pxd_cdef(int x):
"""
>>> call_static_pxd_cdef(2)
@@ -94,3 +98,11 @@ def call_static_pxd_cdef(int x):
"""
cdef int *x_ptr = &x
return FromPxd.static_cdef(x_ptr)
+
+def call_static_pxd_cdef_with_implicit_object(int x):
+ """
+ # https://github.com/cython/cython/issues/3174
+ >>> call_static_pxd_cdef_with_implicit_object(2)
+ 3
+ """
+ return FromPxd.static_cdef_with_implicit_object(x)