diff options
author | Nils Braun <nils.braun@kit.edu> | 2017-10-28 16:05:39 +0200 |
---|---|---|
committer | Nils Braun <nils.braun@kit.edu> | 2017-10-28 16:05:39 +0200 |
commit | b1d62ad550fa7509e70854fc753c6b3e841d4b8a (patch) | |
tree | da76f6d1e67d9fd727291fb052fef7ea6d2bf74c | |
parent | ab7b75cd4db9ddab7f5456ed1cfdc3b0e11ffb98 (diff) | |
download | cython-b1d62ad550fa7509e70854fc753c6b3e841d4b8a.tar.gz |
Replace the content instead of calling the copy-assignment, which is not implemented
-rw-r--r-- | Cython/Compiler/ExprNodes.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Cython/Compiler/ExprNodes.py b/Cython/Compiler/ExprNodes.py index e56088cb1..50e1f6a6c 100644 --- a/Cython/Compiler/ExprNodes.py +++ b/Cython/Compiler/ExprNodes.py @@ -2284,7 +2284,11 @@ class NameNode(AtomicExprNode): code.putln('%s = %s;' % (self.result(), result)) else: result = rhs.result_as(self.ctype()) - code.putln('%s = %s;' % (self.result(), result)) + + if is_pythran_expr(self.type): + code.putln('new (&%s) decltype(%s){%s};' % (self.result(), self.result(), result)) + else: + code.putln('%s = %s;' % (self.result(), result)) if debug_disposal_code: print("NameNode.generate_assignment_code:") print("...generating post-assignment code for %s" % rhs) |