diff options
author | 0dminnimda <0dminnimda@gmail.com> | 2022-02-25 18:45:28 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-25 16:45:28 +0100 |
commit | b7ff8224f56af256245d691af589ab10126126d3 (patch) | |
tree | 596edc79e783422a55edcfe49bf66f12df6430f8 /tests/errors | |
parent | 97b8a0b9e9d9599f52d810b6f1ed52ebc1796918 (diff) | |
download | cython-b7ff8224f56af256245d691af589ab10126126d3.tar.gz |
Turn the redeclaration of attributes as C methods into an error since it currently leads to difficult to predict behaviour. (#4661)
Diffstat (limited to 'tests/errors')
-rw-r--r-- | tests/errors/redeclaration_of_var_by_cfunc_T600.pyx | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/errors/redeclaration_of_var_by_cfunc_T600.pyx b/tests/errors/redeclaration_of_var_by_cfunc_T600.pyx new file mode 100644 index 000000000..a568f0f90 --- /dev/null +++ b/tests/errors/redeclaration_of_var_by_cfunc_T600.pyx @@ -0,0 +1,14 @@ +# ticket: 600 +# mode: error + +cdef class Bar: + cdef list _operands + + cdef int _operands(self): + return -1 + + +_ERRORS = """ +7:9: '_operands' redeclared +5:14: Previous declaration is here +""" |