From 4137a4dbf386f19b0ce4f5de5b0a8ab05a3b2b8b Mon Sep 17 00:00:00 2001 From: Araq Date: Wed, 17 Jul 2019 22:36:23 +0200 Subject: [feature] detect unused imports --- compiler/semdata.nim | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'compiler/semdata.nim') diff --git a/compiler/semdata.nim b/compiler/semdata.nim index e411633c2..a64f88962 100644 --- a/compiler/semdata.nim +++ b/compiler/semdata.nim @@ -74,7 +74,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 @@ -139,6 +140,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 -- cgit 1.4.1-2-gfad0