summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2015-03-01 13:51:48 +0100
committerAraq <rumpf_a@web.de>2015-03-01 13:52:00 +0100
commit566ee874cde6defb128cdf9df124c45146187129 (patch)
tree096cd67fcd55a5d2858510f238cbdb9e234aebb6
parent6226973c7ff0a44edd39bed029665a745313a162 (diff)
downloadNim-566ee874cde6defb128cdf9df124c45146187129.tar.gz
minor cleanups
-rw-r--r--compiler/astalgo.nim5
-rw-r--r--compiler/lookups.nim2
-rw-r--r--compiler/semcall.nim2
3 files changed, 4 insertions, 5 deletions
diff --git a/compiler/astalgo.nim b/compiler/astalgo.nim
index 79c386080..8d132ab26 100644
--- a/compiler/astalgo.nim
+++ b/compiler/astalgo.nim
@@ -681,9 +681,8 @@ proc initIdentIter(ti: var TIdentIter, tab: TStrTable, s: PIdent): PSym =
   else: result = nextIdentIter(ti, tab)
   
 proc nextIdentIter(ti: var TIdentIter, tab: TStrTable): PSym = 
-  var h, start: THash
-  h = ti.h and high(tab.data)
-  start = h
+  var h = ti.h and high(tab.data)
+  var start = h
   result = tab.data[h]
   while result != nil: 
     if result.name.id == ti.name.id: break 
diff --git a/compiler/lookups.nim b/compiler/lookups.nim
index 21d07f280..6d3379bb9 100644
--- a/compiler/lookups.nim
+++ b/compiler/lookups.nim
@@ -176,7 +176,7 @@ proc addInterfaceDeclAux(c: PContext, sym: PSym) =
   if sfExported in sym.flags:
     # add to interface:
     if c.module != nil: strTableAdd(c.module.tab, sym)
-    else: internalError(sym.info, "AddInterfaceDeclAux")
+    else: internalError(sym.info, "addInterfaceDeclAux")
 
 proc addInterfaceDeclAt*(c: PContext, scope: PScope, sym: PSym) =
   addDeclAt(scope, sym)
diff --git a/compiler/semcall.nim b/compiler/semcall.nim
index 56cc9dd9e..d92e1ab20 100644
--- a/compiler/semcall.nim
+++ b/compiler/semcall.nim
@@ -42,7 +42,7 @@ proc pickBestCandidate(c: PContext, headSymbol: PNode,
                        errors: var CandidateErrors) =
   var o: TOverloadIter
   var sym = initOverloadIter(o, c, headSymbol)
-  var symScope = o.lastOverloadScope
+  let symScope = o.lastOverloadScope
 
   var z: TCandidate