diff options
author | Araq <rumpf_a@web.de> | 2013-12-29 01:13:51 +0100 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2013-12-29 01:13:51 +0100 |
commit | 438703f59e4d226f6e83e78c4f549a381526c6c2 (patch) | |
tree | dd13f0b882482e51f513cbbcb0ce292a66098c09 /compiler/pretty.nim | |
parent | 1101a40f91880b6cd1f0807d2b272eda7b5c9491 (diff) | |
download | Nim-438703f59e4d226f6e83e78c4f549a381526c6c2.tar.gz |
case consistency: next steps
Diffstat (limited to 'compiler/pretty.nim')
-rw-r--r-- | compiler/pretty.nim | 7 |
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]) |