fixes nimsuggest issue #41

This commit is contained in:
Araq
2016-12-18 00:03:47 +01:00
parent d4c33df919
commit bda8a6c1b7

View File

@@ -172,7 +172,9 @@ proc sumGeneric(t: PType): int =
inc result
of tyGenericInvocation, tyTuple, tyProc:
result += ord(t.kind == tyGenericInvocation)
for i in 0 .. <t.len: result += t.sons[i].sumGeneric
for i in 0 .. <t.len:
if t.sons[i] != nil:
result += t.sons[i].sumGeneric
break
of tyGenericParam, tyExpr, tyStatic, tyStmt: break
of tyBool, tyChar, tyEnum, tyObject, tyPointer,