summary refs log tree commit diff stats
path: root/compiler/pretty.nim
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/pretty.nim')
-rw-r--r--compiler/pretty.nim7
1 files changed, 3 insertions, 4 deletions
diff --git a/compiler/pretty.nim b/compiler/pretty.nim
index 704857f37..54d47393e 100644
--- a/compiler/pretty.nim
+++ b/compiler/pretty.nim
@@ -149,9 +149,8 @@ proc checkDef(c: PGen; n: PNode) =
   if {sfImportc, sfExportc} * s.flags == {} or c.checkExtern:
     checkStyle(n.info, s.name.s, s.kind)
 
-proc checkUse*(n: PNode) =
-  if n.info.fileIndex < 0 or n.kind != nkSym: return
-  let s = n.sym
+proc checkUse*(n: PNode, s: PSym) =
+  if n.info.fileIndex < 0: return
   # we simply convert it to what it looks like in the definition
   # for consistency
   
@@ -267,7 +266,7 @@ when false:
 
 proc check(c: PGen, n: PNode) =
   case n.kind
-  of nkSym: checkUse(n)
+  of nkSym: checkUse(n, n.sym)
   of nkBlockStmt, nkBlockExpr, nkBlockType:
     checkDef(c, n[0])
     check(c, n.sons[1])