Merge pull request #3025 from r-ku/3022_fix

Fixes #3022
This commit is contained in:
Andreas Rumpf 2015-06-30 17:54:39 +02:00
commit 2f9ad55fbd
3 changed files with 39 additions and 1 deletions

View file

@ -158,11 +158,15 @@ 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, tyTypeDesc: break
of tyGenericParam, tyExpr, tyStatic, tyStmt: break
of tyBool, tyChar, tyEnum, tyObject, tyProc, tyPointer,
tyString, tyCString, tyInt..tyInt64, tyFloat..tyFloat128,
tyUInt..tyUInt64: