diff --git a/ExprPrimaryNodes.py b/ExprPrimaryNodes.py index 53a04e651142e2c7390c9f3b0f3177f878ddff92..7462c53e8ba7fff996c5e33062d9cc9fdef66ae8 100644 --- a/ExprPrimaryNodes.py +++ b/ExprPrimaryNodes.py @@ -254,7 +254,7 @@ class ClassCreateNode(ASTNode): found = False m = getMethod(classDef.constructors, self.args) if m: - self.cons = c + self.cons = m self.myType = self.className.myType else: raise Exception("ERROR: Class {} doesn't have a constructor with given argument types.".format(classDef.name))