From 30ccadfe4c7674cd8e58f6a8fe75055c4518dac3 Mon Sep 17 00:00:00 2001 From: Zahary Karadjov Date: Sun, 4 Jun 2017 18:16:29 +0300 Subject: [PATCH] fix #5890 --- compiler/sigmatch.nim | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/compiler/sigmatch.nim b/compiler/sigmatch.nim index cb526947e..4797366f8 100644 --- a/compiler/sigmatch.nim +++ b/compiler/sigmatch.nim @@ -1339,7 +1339,8 @@ proc typeRel(c: var TCandidate, f, aOrig: PType, result = isNone else: result = typeRel(c, lastSon(f), a) - if result != isNone: put(c, f, a) + if result != isNone and a.kind != tyNil: + put(c, f, a) of tyGenericBody: considerPreviousT: