From: Robert Bradshaw Date: Mon, 17 Jan 2011 20:03:01 +0000 (-0800) Subject: Make decorators on special functions an error. Trac #649. X-Git-Tag: 0.14.1rc0~1 X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=47ca6aaa1dead9ced53d880aa183ab544ed2b680;p=cython.git Make decorators on special functions an error. Trac #649. --- diff --git a/Cython/Compiler/Nodes.py b/Cython/Compiler/Nodes.py index 86031fd3..af94c788 100644 --- a/Cython/Compiler/Nodes.py +++ b/Cython/Compiler/Nodes.py @@ -2056,7 +2056,7 @@ class DefNode(FuncDefNode): def analyse_signature(self, env): if self.entry.is_special: if self.decorators: - warning(self.pos, "special functions of cdef classes cannot have decorators", 1) + error(self.pos, "special functions of cdef classes cannot have decorators") self.entry.trivial_signature = len(self.args) == 1 and not (self.star_arg or self.starstar_arg) elif not env.directives['always_allow_keywords'] and not (self.star_arg or self.starstar_arg): # Use the simpler calling signature for zero- and one-argument functions.