summary refs log tree commit diff stats
path: root/compiler/ccgexprs.nim
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2015-10-14 00:41:27 +0200
committerAraq <rumpf_a@web.de>2015-10-14 00:41:27 +0200
commita40ace648db2659aab35696e145dd3aa604be285 (patch)
tree8c3efe03d4192e9e6806690f73b1855e72bbb2fb /compiler/ccgexprs.nim
parentf4bfa076ae01ed2adec8e7fb6f513144791931bf (diff)
downloadNim-a40ace648db2659aab35696e145dd3aa604be285.tar.gz
fixes regression: tobjconstr2 test works again
Diffstat (limited to 'compiler/ccgexprs.nim')
-rw-r--r--compiler/ccgexprs.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/ccgexprs.nim b/compiler/ccgexprs.nim
index 6d69dafa5..388b6d047 100644
--- a/compiler/ccgexprs.nim
+++ b/compiler/ccgexprs.nim
@@ -1155,7 +1155,7 @@ proc genObjConstr(p: BProc, e: PNode, d: var TLoc) =
     let field = lookupFieldAgain(p, ty, it.sons[0].sym, tmp2.r)
     if field.loc.r == nil: internalError(e.info, "genObjConstr")
     if it.len == 3 and optFieldCheck in p.options:
-      genFieldCheck(p, it.sons[2], tmp2.r, field, ty)
+      genFieldCheck(p, it.sons[2], r, field, ty)
     add(tmp2.r, ".")
     add(tmp2.r, field.loc.r)
     tmp2.k = locTemp