summary refs log tree commit diff stats
path: root/compiler/msgs.nim
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2019-06-19 09:48:21 +0200
committerAraq <rumpf_a@web.de>2019-06-19 09:48:55 +0200
commit296c48de5e502f61f8f969c64a8c364bfe1ee0bc (patch)
treec4cb5ac71c4cbbc20d9b5e565dbf7cc2fc277151 /compiler/msgs.nim
parent79a23fe80564e87ad08e283fcf32a6600b0059b7 (diff)
downloadNim-296c48de5e502f61f8f969c64a8c364bfe1ee0bc.tar.gz
fixes #11436
Diffstat (limited to 'compiler/msgs.nim')
-rw-r--r--compiler/msgs.nim3
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/msgs.nim b/compiler/msgs.nim
index bbee27e67..2162ee559 100644
--- a/compiler/msgs.nim
+++ b/compiler/msgs.nim
@@ -452,7 +452,8 @@ proc sourceLine*(conf: ConfigRef; i: TLineInfo): string =
 proc writeSurroundingSrc(conf: ConfigRef; info: TLineInfo) =
   const indent = "  "
   msgWriteln(conf, indent & $sourceLine(conf, info))
-  msgWriteln(conf, indent & spaces(info.col) & '^')
+  if info.col >= 0:
+    msgWriteln(conf, indent & spaces(info.col) & '^')
 
 proc formatMsg*(conf: ConfigRef; info: TLineInfo, msg: TMsgKind, arg: string): string =
   let title = case msg