summary refs log tree commit diff stats
path: root/compiler/astmsgs.nim
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/astmsgs.nim')
-rw-r--r--compiler/astmsgs.nim6
1 files changed, 6 insertions, 0 deletions
diff --git a/compiler/astmsgs.nim b/compiler/astmsgs.nim
index c990b36e8..aeeff1fd0 100644
--- a/compiler/astmsgs.nim
+++ b/compiler/astmsgs.nim
@@ -24,6 +24,12 @@ proc addDeclaredLoc*(result: var string, conf: ConfigRef; typ: PType) =
     result.add " declared in " & toFileLineCol(conf, typ.sym.info)
   result.add "]"
 
+proc addTypeNodeDeclaredLoc*(result: var string, conf: ConfigRef; typ: PType) =
+  result.add " [$1" % typ.kind.toHumanStr
+  if typ.sym != nil:
+    result.add " declared in " & toFileLineCol(conf, typ.sym.info)
+  result.add "]"
+
 proc addDeclaredLocMaybe*(result: var string, conf: ConfigRef; typ: PType) =
   if optDeclaredLocs in conf.globalOptions: addDeclaredLoc(result, conf, typ)