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: