Commit 50d3c1df authored by gsamain's avatar gsamain Committed by Xavier Thompson

Error message for cypclass new with arguments

parent 1311005a
......@@ -5703,6 +5703,9 @@ class SimpleCallNode(CallNode):
self.function = self.function.analyse_types(env)
function = self.function
if isinstance(function, NewExprNode) and len(self.args) and function.class_type.is_cyp_class:
error(self.pos, "Cypclasses must be constructed without arguments when using new")
if function.is_attribute and function.entry and function.entry.is_cmethod:
# Take ownership of the object from which the attribute
# was obtained, because we need to pass it as 'self'.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment