diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2016-08-05 20:32:01 +0200 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2016-08-05 20:32:01 +0200 |
commit | 7426e9c24639a482930afe9f48c096d7ff726e98 (patch) | |
tree | 99281095a7b7c8e765eba1dd22094419dd35cc8d /compiler | |
parent | 8882b062e110877bf361241e8f85739a6ee754e6 (diff) | |
parent | df0baefb1238adccf15c18e75992c5472aa02f65 (diff) | |
download | Nim-7426e9c24639a482930afe9f48c096d7ff726e98.tar.gz |
Merge branch 'devel' of github.com:nim-lang/Nim into devel
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/sigmatch.nim | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/sigmatch.nim b/compiler/sigmatch.nim index 19ef8a117..7cde101cb 100644 --- a/compiler/sigmatch.nim +++ b/compiler/sigmatch.nim @@ -900,6 +900,8 @@ proc typeRel(c: var TCandidate, f, aOrig: PType, doBind = true): TTypeRelation = if sameDistinctTypes(f, a): result = isEqual elif f.base.kind == tyAnything: result = isGeneric elif c.coerceDistincts: result = typeRel(c, f.base, a) + elif a.kind == tyNil and f.base.kind in NilableTypes: + result = f.allowsNil elif c.coerceDistincts: result = typeRel(c, f.base, a) of tySet: if a.kind == tySet: |