summary refs log tree commit diff stats
path: root/compiler/plugins/locals.nim
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2020-12-17 08:01:36 +0100
committerGitHub <noreply@github.com>2020-12-17 08:01:36 +0100
commit979148e863c4142a00632059f3e2a57f4ab0f960 (patch)
tree398df831eda7a739e4b57786cff248ef78088c65 /compiler/plugins/locals.nim
parent3b963a8150e3c541859931a1ef9ecb338e46907f (diff)
downloadNim-979148e863c4142a00632059f3e2a57f4ab0f960.tar.gz
refactorings to prepare the compiler for IC (#15935)
* added ic specific Nim code; WIP
* make the symbol import mechanism lazy; WIP
* ensure that modules can be imported multiple times
* ambiguity checking
* handle converters and TR macros properly
* make 'enum' test category green again
* special logic for semi-pure enums
* makes nimsuggest tests green again
* fixes nimdata
* makes nimpy green again
* makes more important packages work
Diffstat (limited to 'compiler/plugins/locals.nim')
-rw-r--r--compiler/plugins/locals.nim3
1 files changed, 1 insertions, 2 deletions
diff --git a/compiler/plugins/locals.nim b/compiler/plugins/locals.nim
index efa8b1e94..6b0594197 100644
--- a/compiler/plugins/locals.nim
+++ b/compiler/plugins/locals.nim
@@ -19,8 +19,7 @@ proc semLocals*(c: PContext, n: PNode): PNode =
   tupleType.n = newNodeI(nkRecList, n.info)
   let owner = getCurrOwner(c)
   # for now we skip openarrays ...
-  for scope in walkScopes(c.currentScope):
-    if scope == c.topLevelScope: break
+  for scope in localScopesFrom(c, c.currentScope):
     for it in items(scope.symbols):
       if it.kind in skLocalVars and
           it.typ.skipTypes({tyGenericInst, tyVar}).kind notin