This commit is contained in:
Araq 2014-11-12 02:36:59 +01:00
commit b2f577df23
9 changed files with 104 additions and 26 deletions

View file

@ -987,8 +987,13 @@ proc genMagic(c: PCtx; n: PNode; dest: var TDest) =
unused(n, dest)
genUnaryStmt(c, n, opcNWarning)
of mNError:
unused(n, dest)
genUnaryStmt(c, n, opcNError)
if n.len <= 1:
# query error condition:
c.gABC(n, opcQueryErrorFlag, dest)
else:
# setter
unused(n, dest)
genUnaryStmt(c, n, opcNError)
of mNCallSite:
if dest < 0: dest = c.getTemp(n.typ)
c.gABC(n, opcCallSite, dest)