summary refs log tree commit diff stats
path: root/compiler/sigmatch.nim
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2015-04-25 23:13:38 +0200
committerAraq <rumpf_a@web.de>2015-04-25 23:17:00 +0200
commite40b6678919ae659ee209e248dc3e4c627c6e6c2 (patch)
tree0d104aa4485369de157a2cfc67b4e8af28783192 /compiler/sigmatch.nim
parentd3fc6e1f285950d9cddb338206d553ff7baee7d5 (diff)
downloadNim-e40b6678919ae659ee209e248dc3e4c627c6e6c2.tar.gz
fixes regression: overloading by 'var'
Diffstat (limited to 'compiler/sigmatch.nim')
-rw-r--r--compiler/sigmatch.nim5
1 files changed, 3 insertions, 2 deletions
diff --git a/compiler/sigmatch.nim b/compiler/sigmatch.nim
index aad6b590e..2eda33c14 100644
--- a/compiler/sigmatch.nim
+++ b/compiler/sigmatch.nim
@@ -159,7 +159,7 @@ proc sumGeneric(t: PType): int =
       inc result
       inc isvar
     of tyGenericInvocation, tyTuple:
-      result = ord(t.kind == tyGenericInvocation)
+      result += ord(t.kind == tyGenericInvocation)
       for i in 0 .. <t.len: result += t.sons[i].sumGeneric
       break
     of tyGenericParam, tyExpr, tyStatic, tyStmt, tyTypeDesc: break
@@ -167,7 +167,8 @@ proc sumGeneric(t: PType): int =
         tyString, tyCString, tyInt..tyInt64, tyFloat..tyFloat128,
         tyUInt..tyUInt64:
       return isvar
-    else: return 0
+    else:
+      return 0
 
 #var ggDebug: bool