summaryrefslogtreecommitdiff
path: root/tests/errors
diff options
context:
space:
mode:
authorStefan Behnel <stefan_ml@behnel.de>2021-02-09 17:40:32 +0100
committerStefan Behnel <stefan_ml@behnel.de>2021-02-09 17:40:32 +0100
commitc2fea5bf4a6e011a039f8764862bb6338a2ae546 (patch)
treebda493b34c7ab50782442da4b2ab581fb9a17314 /tests/errors
parentead396c54086a418618ed10c9e300b1ebbd54135 (diff)
parentae4e39dbc3d088adb92d6f2d7dd43577c184aa72 (diff)
downloadcython-c2fea5bf4a6e011a039f8764862bb6338a2ae546.tar.gz
Merge branch '0.29.x'
Diffstat (limited to 'tests/errors')
-rw-r--r--tests/errors/cpdef_vars.pyx18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/errors/cpdef_vars.pyx b/tests/errors/cpdef_vars.pyx
new file mode 100644
index 000000000..0523ca9b7
--- /dev/null
+++ b/tests/errors/cpdef_vars.pyx
@@ -0,0 +1,18 @@
+# tag: warnings
+
+cpdef str a = "123"
+cpdef b = 2
+
+cdef class C:
+ cpdef float c
+
+def func():
+ cpdef d=C()
+ return d
+
+_WARNINGS = """
+3:6: cpdef variables will not be supported in Cython 3; currently they are no different from cdef variables
+4:6: cpdef variables will not be supported in Cython 3; currently they are no different from cdef variables
+7:10: cpdef variables will not be supported in Cython 3; currently they are no different from cdef variables
+10:10: cpdef variables will not be supported in Cython 3; currently they are no different from cdef variables
+"""