summary refs log tree commit diff stats
path: root/compiler
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2015-07-01 17:42:12 +0200
committerAraq <rumpf_a@web.de>2015-07-01 17:42:12 +0200
commitb159fc3b349573114ac990f52d5c3e10684f6a91 (patch)
tree5e680db32a9359f4aece31298479f13a6dc86dd4 /compiler
parent30829ffec41dd7c4e024e506f45404f9038bb9b3 (diff)
downloadNim-b159fc3b349573114ac990f52d5c3e10684f6a91.tar.gz
fixes #2993
Diffstat (limited to 'compiler')
-rw-r--r--compiler/sigmatch.nim8
1 files changed, 2 insertions, 6 deletions
diff --git a/compiler/sigmatch.nim b/compiler/sigmatch.nim
index 97a059dbe..88a2155dc 100644
--- a/compiler/sigmatch.nim
+++ b/compiler/sigmatch.nim
@@ -158,15 +158,11 @@ proc sumGeneric(t: PType): int =
       t = t.sons[0]
       inc result
       inc isvar
-    of tyTypeDesc:
-      t = t.lastSon
-      if t.kind == tyEmpty: break
-      inc result
     of tyGenericInvocation, tyTuple:
       result += ord(t.kind == tyGenericInvocation)
       for i in 0 .. <t.len: result += t.sons[i].sumGeneric
       break
-    of tyGenericParam, tyExpr, tyStatic, tyStmt: break
+    of tyGenericParam, tyExpr, tyStatic, tyStmt, tyTypeDesc: break
     of tyBool, tyChar, tyEnum, tyObject, tyProc, tyPointer,
         tyString, tyCString, tyInt..tyInt64, tyFloat..tyFloat128,
         tyUInt..tyUInt64:
@@ -1522,7 +1518,7 @@ proc matchesAux(c: PContext, n, nOrig: PNode,
       n.sons[a].sons[1] = prepareOperand(c, formal.typ, n.sons[a].sons[1])
       n.sons[a].typ = n.sons[a].sons[1].typ
       var arg = paramTypesMatch(m, formal.typ, n.sons[a].typ,
-                                n.sons[a].sons[1], nOrig.sons[a].sons[1])
+                                n.sons[a].sons[1], n.sons[a].sons[1])
       if arg == nil:
         m.state = csNoMatch
         return