From 1a14e9d366799181f7d04ea3572c8b9052607584 Mon Sep 17 00:00:00 2001 From: r-ku Date: Tue, 30 Jun 2015 14:32:52 +0300 Subject: [PATCH] Fixes #3022 --- compiler/sigmatch.nim | 6 +++++- tests/generics/mgenericprocmatcher.nim | 11 +++++++++++ tests/generics/tgenericprocmatcher.nim | 23 +++++++++++++++++++++++ 3 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 tests/generics/mgenericprocmatcher.nim create mode 100644 tests/generics/tgenericprocmatcher.nim diff --git a/compiler/sigmatch.nim b/compiler/sigmatch.nim index 40836a94d1..97a059dbe8 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 ..