From 2c91e999e29208f89ab6b0995b6942b69a1e23e3 Mon Sep 17 00:00:00 2001 From: Araq Date: Fri, 24 Apr 2015 20:28:39 +0200 Subject: [PATCH] fixes #2600 --- compiler/sigmatch.nim | 10 +++++----- tests/overload/tspec.nim | 31 ++++++++++++++++++++++++++++++- web/question.txt | 29 +++++++++++++++-------------- 3 files changed, 50 insertions(+), 20 deletions(-) diff --git a/compiler/sigmatch.nim b/compiler/sigmatch.nim index 5c8a3bc58..aad6b590e 100644 --- a/compiler/sigmatch.nim +++ b/compiler/sigmatch.nim @@ -147,6 +147,7 @@ proc copyCandidate(a: var TCandidate, b: TCandidate) = proc sumGeneric(t: PType): int = var t = t + var isvar = 1 while true: case t.kind of tyGenericInst, tyArray, tyRef, tyPtr, tyDistinct, tyArrayConstr, @@ -154,8 +155,9 @@ proc sumGeneric(t: PType): int = t = t.lastSon inc result of tyVar: - # but do not make 'var T' more specific than 'T'! t = t.sons[0] + inc result + inc isvar of tyGenericInvocation, tyTuple: result = ord(t.kind == tyGenericInvocation) for i in 0 .. `_) - Sublime Text: Available via Package Control (`Repository `_) + - LiClipse: http://www.liclipse.com/ (Eclipse based plugin) .. container:: standout