diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2019-07-19 01:06:45 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-19 01:06:45 +0200 |
commit | a5d6080a81486412e7567658fa816c475e27e42c (patch) | |
tree | ae4d5349c81e33bd83cfe8c3ea94bc0c5e684100 /compiler/semdata.nim | |
parent | 6d8913ee1422143baebd438f7526208193c0bd5e (diff) | |
parent | fbb0642e278efd1b9ac4175228befc58655c3849 (diff) | |
download | Nim-a5d6080a81486412e7567658fa816c475e27e42c.tar.gz |
Merge pull request #11766 from nim-lang/araq-detect-unused-imports
[feature] detect unused imports
Diffstat (limited to 'compiler/semdata.nim')
-rw-r--r-- | compiler/semdata.nim | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/semdata.nim b/compiler/semdata.nim index 6c7dd02ed..76eb468ed 100644 --- a/compiler/semdata.nim +++ b/compiler/semdata.nim @@ -71,7 +71,8 @@ type TExprFlags* = set[TExprFlag] PContext* = ref TContext - TContext* = object of TPassContext # a context represents a module + TContext* = object of TPassContext # a context represents the module + # that is currently being compiled enforceVoidContext*: PType module*: PSym # the module sym belonging to the context currentScope*: PScope # current scope @@ -136,6 +137,7 @@ type # the generic type has been constructed completely. See # tests/destructor/topttree.nim for an example that # would otherwise fail. + unusedImports*: seq[(PSym, TLineInfo)] template config*(c: PContext): ConfigRef = c.graph.config |