summary refs log tree commit diff stats
path: root/compiler/msgs.nim
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2012-11-19 00:16:25 +0100
committerAraq <rumpf_a@web.de>2012-11-19 00:16:25 +0100
commit14fc0631d7cfa7436b9703fd8d08235b2b5929b7 (patch)
tree2bf9c695b6b442bc33aa6e2eebb436e8bd986f15 /compiler/msgs.nim
parentdb80038c378f4b63845cb1b035f2b3dfdd25c2fc (diff)
downloadNim-14fc0631d7cfa7436b9703fd8d08235b2b5929b7.tar.gz
fixes #250
Diffstat (limited to 'compiler/msgs.nim')
-rwxr-xr-xcompiler/msgs.nim9
1 files changed, 5 insertions, 4 deletions
diff --git a/compiler/msgs.nim b/compiler/msgs.nim
index 45075cba8..0f795c07d 100755
--- a/compiler/msgs.nim
+++ b/compiler/msgs.nim
@@ -104,7 +104,7 @@ type
     warnUnknownSubstitutionX, warnLanguageXNotSupported, warnCommentXIgnored, 
     warnNilStatement, warnAnalysisLoophole,
     warnDifferentHeaps, warnWriteToForeignHeap, warnImplicitClosure,
-    warnEachIdentIsTuple, warnUser,
+    warnEachIdentIsTuple, warnShadowIdent, warnUser,
     hintSuccess, hintSuccessX, 
     hintLineTooLong, hintXDeclaredButNotUsed, hintConvToBaseNotNeeded, 
     hintConvFromXtoItselfNotNeeded, hintExprAlwaysX, hintQuitCalled, 
@@ -351,6 +351,7 @@ const
     warnWriteToForeignHeap: "write to foreign heap [WriteToForeignHeap]",
     warnImplicitClosure: "implicit closure convention: '$1' [ImplicitClosure]",
     warnEachIdentIsTuple: "each identifier is a tuple [EachIdentIsTuple]",
+    warnShadowIdent: "shadowed identifier: '$1' [ShadowIdent]",
     warnUser: "$1 [User]", 
     hintSuccess: "operation successful [Success]", 
     hintSuccessX: "operation successful ($# lines compiled; $# sec total; $#) [SuccessX]", 
@@ -370,14 +371,14 @@ const
     hintUser: "$1 [User]"]
 
 const
-  WarningsToStr*: array[0..18, string] = ["CannotOpenFile", "OctalEscape", 
+  WarningsToStr*: array[0..19, string] = ["CannotOpenFile", "OctalEscape", 
     "XIsNeverRead", "XmightNotBeenInit",
     "Deprecated", "ConfigDeprecated",
     "SmallLshouldNotBeUsed", "UnknownMagic", 
     "RedefinitionOfLabel", "UnknownSubstitutionX", "LanguageXNotSupported", 
     "CommentXIgnored", "NilStmt",
     "AnalysisLoophole", "DifferentHeaps", "WriteToForeignHeap",
-    "ImplicitClosure", "EachIdentIsTuple", "User"]
+    "ImplicitClosure", "EachIdentIsTuple", "ShadowIdent", "User"]
 
   HintsToStr*: array[0..15, string] = ["Success", "SuccessX", "LineTooLong", 
     "XDeclaredButNotUsed", "ConvToBaseNotNeeded", "ConvFromXtoItselfNotNeeded", 
@@ -464,7 +465,7 @@ proc raiseRecoverableError*(msg: string) {.noinline, noreturn.} =
   raise newException(ERecoverableError, msg)
 
 var
-  gNotes*: TNoteKinds = {low(TNoteKind)..high(TNoteKind)}
+  gNotes*: TNoteKinds = {low(TNoteKind)..high(TNoteKind)} - {warnShadowIdent}
   gErrorCounter*: int = 0     # counts the number of errors
   gHintCounter*: int = 0
   gWarnCounter*: int = 0