summary refs log tree commit diff stats
path: root/compiler
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2016-07-10 01:16:40 +0200
committerAndreas Rumpf <rumpf_a@web.de>2016-07-10 01:17:08 +0200
commitd7e172a6bc351ed926f93b77a14fc5cddbce3293 (patch)
treec68909d89efb9506a770509a674bebe3ea555489 /compiler
parent58f4b4ce2343e8f7a9ab2b22567d7d42764ab68e (diff)
downloadNim-d7e172a6bc351ed926f93b77a14fc5cddbce3293.tar.gz
make tests green again
Diffstat (limited to 'compiler')
-rw-r--r--compiler/ast.nim1
-rw-r--r--compiler/commands.nim3
-rw-r--r--compiler/msgs.nim1
-rw-r--r--compiler/scriptconfig.nim1
4 files changed, 4 insertions, 2 deletions
diff --git a/compiler/ast.nim b/compiler/ast.nim
index 2b4de75cc..5d587f35a 100644
--- a/compiler/ast.nim
+++ b/compiler/ast.nim
@@ -965,7 +965,6 @@ const
 var ggDebug* {.deprecated.}: bool ## convenience switch for trying out things
 var
   gMainPackageId*: int
-  gMainPackageNotes*: TNoteKinds
 
 proc isCallExpr*(n: PNode): bool =
   result = n.kind in nkCallKinds
diff --git a/compiler/commands.nim b/compiler/commands.nim
index 22512c563..b468dd6b8 100644
--- a/compiler/commands.nim
+++ b/compiler/commands.nim
@@ -181,9 +181,11 @@ proc processSpecificNote*(arg: string, state: TSpecialWord, pass: TCmdLinePass,
   case whichKeyword(substr(arg, i))
   of wOn:
     incl(gNotes, n)
+    incl(gMainPackageNotes, n)
     incl(enableNotes, n)
   of wOff:
     excl(gNotes, n)
+    excl(gMainPackageNotes, n)
     incl(disableNotes, n)
     excl(ForeignPackageNotes, n)
   else: localError(info, errOnOrOffExpectedButXFound, arg)
@@ -548,6 +550,7 @@ proc processSwitch(switch, arg: string, pass: TCmdLinePass, info: TLineInfo) =
     gNotes = NotesVerbosity[gVerbosity]
     incl(gNotes, enableNotes)
     excl(gNotes, disableNotes)
+    gMainPackageNotes = gNotes
   of "parallelbuild":
     expectArg(switch, arg, pass, info)
     gNumberOfProcessors = parseInt(arg)
diff --git a/compiler/msgs.nim b/compiler/msgs.nim
index 098370e41..03a63483d 100644
--- a/compiler/msgs.nim
+++ b/compiler/msgs.nim
@@ -621,6 +621,7 @@ var
   gHintCounter*: int = 0
   gWarnCounter*: int = 0
   gErrorMax*: int = 1         # stop after gErrorMax errors
+  gMainPackageNotes*: TNoteKinds = NotesVerbosity[1]
 
 proc unknownLineInfo*(): TLineInfo =
   result.line = int16(-1)
diff --git a/compiler/scriptconfig.nim b/compiler/scriptconfig.nim
index 1d34cd2be..dcb92227d 100644
--- a/compiler/scriptconfig.nim
+++ b/compiler/scriptconfig.nim
@@ -155,4 +155,3 @@ proc runNimScript*(scriptName: string; freshDefines=true) =
   #initDefines()
   undefSymbol("nimscript")
   undefSymbol("nimconfig")
-  gMainPackageNotes = {}