summary refs log tree commit diff stats
path: root/compiler/sigmatch.nim
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2016-12-19 11:35:45 +0100
committerAraq <rumpf_a@web.de>2016-12-19 11:35:45 +0100
commit237252f90cbea354ee7104388b174f0ed899803c (patch)
tree498e985bb160e21c79f5c7c84975e2e6b1cc819b /compiler/sigmatch.nim
parent24239c23619e9d64562699b5d890fa2575e9c9cb (diff)
parentc130a2af17e0d5e948d21e6cb5bd0aca02ddb977 (diff)
downloadNim-237252f90cbea354ee7104388b174f0ed899803c.tar.gz
Merge branch 'devel' into sighashes
Diffstat (limited to 'compiler/sigmatch.nim')
-rw-r--r--compiler/sigmatch.nim4
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/sigmatch.nim b/compiler/sigmatch.nim
index 16358b1a8..a94579339 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 tyAlias: t = t.lastSon