Permalink
Browse files

Make decorators on special functions an error. Trac #649.

  • Loading branch information...
robertwb committed Jan 17, 2011
1 parent 6590909 commit 47ca6aaa1dead9ced53d880aa183ab544ed2b680
Showing with 1 addition and 1 deletion.
  1. +1 −1 Cython/Compiler/Nodes.py
View
@@ -2056,7 +2056,7 @@ def analyse_argument_types(self, env):
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.

0 comments on commit 47ca6aa

Please sign in to comment.