Commit 7293bf0e authored by Robert Bradshaw's avatar Robert Bradshaw

Fix ticket #36, casting non-simple expression.

parent cb5166ac
......@@ -2951,6 +2951,7 @@ class TypecastNode(ExprNode):
self.operand = self.operand.coerce_to_pyobject(env)
warning(self.pos, "No conversion from %s to %s, python object pointer used." % (self.operand.type, self.type))
self.operand = self.operand.coerce_to_simple(env)
elif from_py and not to_py:
if self.type.from_py_function:
self.operand = self.operand.coerce_to(self.type, env)
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