summary refs log tree commit diff stats
path: root/compiler
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2014-11-22 23:09:50 +0100
committerAraq <rumpf_a@web.de>2014-11-22 23:09:50 +0100
commit83c655266dd1f9ba3ddbdf9389edbce4d30740a3 (patch)
tree976c26b4497db9dd3d2a11f524f9f107fbf4c3a3 /compiler
parent2a1acbd1a6042454f99455c721a3fc4c574eb1f8 (diff)
downloadNim-83c655266dd1f9ba3ddbdf9389edbce4d30740a3.tar.gz
more robust against unknown line info
Diffstat (limited to 'compiler')
-rw-r--r--compiler/cgen.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/cgen.nim b/compiler/cgen.nim
index b00c0b0a7..51c426d79 100644
--- a/compiler/cgen.nim
+++ b/compiler/cgen.nim
@@ -284,7 +284,7 @@ proc genLineDir(p: BProc, t: PNode) =
             line.toRope, makeCString(toFilename(t.info)))
   elif ({optLineTrace, optStackTrace} * p.options ==
       {optLineTrace, optStackTrace}) and
-      (p.prc == nil or sfPure notin p.prc.flags):
+      (p.prc == nil or sfPure notin p.prc.flags) and t.info.fileIndex >= 0:
     linefmt(p, cpsStmts, "nimln($1, $2);$n",
             line.toRope, t.info.quotedFilename)