diff options
author | r-ku <rokups@zoho.com> | 2015-06-30 14:32:52 +0300 |
---|---|---|
committer | r-ku <rokups@zoho.com> | 2015-06-30 17:52:18 +0300 |
commit | 1a14e9d366799181f7d04ea3572c8b9052607584 (patch) | |
tree | 9a0514dfb9efc8042802c5e5c5967cd0b6bb3ac3 /compiler | |
parent | 17f852c769078f87e2889d5123f66c3bb6c58a4a (diff) | |
download | Nim-1a14e9d366799181f7d04ea3572c8b9052607584.tar.gz |
Fixes #3022
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/sigmatch.nim | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/compiler/sigmatch.nim b/compiler/sigmatch.nim index 40836a94d..97a059dbe 100644 --- a/compiler/sigmatch.nim +++ b/compiler/sigmatch.nim @@ -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: |