diff options
author | Araq <rumpf_a@web.de> | 2016-12-18 00:03:47 +0100 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2016-12-18 00:03:47 +0100 |
commit | bda8a6c1b7dca04f3292afc853889ce678f9f1dc (patch) | |
tree | da6565a8a375179cb266214832208ac6b669d91d /compiler/sigmatch.nim | |
parent | d4c33df91996e30ded5f7f2014e7cd49176b5b05 (diff) | |
download | Nim-bda8a6c1b7dca04f3292afc853889ce678f9f1dc.tar.gz |
fixes nimsuggest issue #41
Diffstat (limited to 'compiler/sigmatch.nim')
-rw-r--r-- | compiler/sigmatch.nim | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/sigmatch.nim b/compiler/sigmatch.nim index 15171874f..0f31edf1a 100644 --- a/compiler/sigmatch.nim +++ b/compiler/sigmatch.nim @@ -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, |