summaryrefslogtreecommitdiff
path: root/tests/errors
diff options
context:
space:
mode:
authorda-woods <dw-git@d-woods.co.uk>2021-07-02 15:25:55 +0100
committerGitHub <noreply@github.com>2021-07-02 16:25:55 +0200
commit875584d1f134d56ccc10d7eaad36f974c32e56e9 (patch)
treeda6f0232af804b4db9def00d7dbd1051a59d9b9a /tests/errors
parentfd8e8cbe3d35bde17888f559563b8b6e8920430d (diff)
downloadcython-875584d1f134d56ccc10d7eaad36f974c32e56e9.tar.gz
Error message on cpdef variables (GH-3963)
Allowing these gives people the false impression that they do something meaningful. Closes https://github.com/cython/cython/issues/887 Closes https://github.com/cython/cython/issues/3959
Diffstat (limited to 'tests/errors')
-rw-r--r--tests/errors/cpdef_vars.pyx12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/errors/cpdef_vars.pyx b/tests/errors/cpdef_vars.pyx
index f356decfc..b317d15b0 100644
--- a/tests/errors/cpdef_vars.pyx
+++ b/tests/errors/cpdef_vars.pyx
@@ -1,4 +1,4 @@
-# tag: warnings
+# mode: error
cpdef str a = "123"
cpdef b = 2
@@ -16,9 +16,9 @@ def func():
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
-15:10: cpdef variables will not be supported in Cython 3; currently they are no different from cdef variables
+_ERRORS = """
+3:6: Variables cannot be declared with 'cpdef'. Use 'cdef' instead.
+4:6: Variables cannot be declared with 'cpdef'. Use 'cdef' instead.
+7:10: Variables cannot be declared with 'cpdef'. Use 'cdef' instead.
+15:10: Variables cannot be declared with 'cpdef'. Use 'cdef' instead.
"""