Commit 86797230 authored by gsamain's avatar gsamain

Error message for cypclass new with arguments

parent 6bb2b2ed
......@@ -5626,6 +5626,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