summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorZahary Karadjov <zahary@gmail.com>2017-06-04 18:16:29 +0300
committerAndreas Rumpf <rumpf_a@web.de>2017-06-20 11:29:42 +0200
commit30ccadfe4c7674cd8e58f6a8fe75055c4518dac3 (patch)
treec9d093bb4b8ff7cd138af4bbf72e14bf8ab39381
parent4f2b69d676411939f3fc88c1f327f1bbadb9fad3 (diff)
downloadNim-30ccadfe4c7674cd8e58f6a8fe75055c4518dac3.tar.gz
fix #5890
-rw-r--r--compiler/sigmatch.nim3
1 files changed, 2 insertions, 1 deletions
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: