summary refs log tree commit diff stats
path: root/compiler
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2018-09-28 10:59:16 +0200
committerGitHub <noreply@github.com>2018-09-28 10:59:16 +0200
commit99a874cc8af70db58da0f3e5e00c318488c6c3ea (patch)
tree0ade0e6c8182731d44d16ac834fe38dc3fab6ca7 /compiler
parent07748dba68a2edba4163e8dfbdf7b09251e8cc30 (diff)
parenta1083d7c43e34fddd9097f7d0122db08092a13ac (diff)
downloadNim-99a874cc8af70db58da0f3e5e00c318488c6c3ea.tar.gz
Merge pull request #9099 from LemonBoy/fix-9098
Fix codegen for some set operations
Diffstat (limited to 'compiler')
-rw-r--r--compiler/ccgexprs.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/ccgexprs.nim b/compiler/ccgexprs.nim
index a1365ce07..1789ce4f1 100644
--- a/compiler/ccgexprs.nim
+++ b/compiler/ccgexprs.nim
@@ -1732,7 +1732,7 @@ proc genSetOp(p: BProc, e: PNode, d: var TLoc, op: TMagic) =
       getTemp(p, getSysType(p.module.g.graph, unknownLineInfo(), tyInt), i) # our counter
       initLocExpr(p, e.sons[1], a)
       initLocExpr(p, e.sons[2], b)
-      if d.k == locNone: getTemp(p, a.t, d)
+      if d.k == locNone: getTemp(p, setType, d)
       lineF(p, cpsStmts,
            "for ($1 = 0; $1 < $2; $1++) $n" &
            "  $3[$1] = $4[$1] $6 $5[$1];$n", [