fixes OR for int8|int16 etc

This commit is contained in:
Araq
2014-04-20 13:59:38 +02:00
parent c80d563afb
commit 39e4e3f205

View File

@@ -854,7 +854,7 @@ proc typeRel(c: var TCandidate, f, aOrig: PType, doBind = true): TTypeRelation =
of tyAnd:
considerPreviousT:
for branch in f.sons:
if typeRel(c, branch, aOrig) == isNone:
if typeRel(c, branch, aOrig) < isSubtype:
return isNone
bindingRet isGeneric
@@ -862,7 +862,7 @@ proc typeRel(c: var TCandidate, f, aOrig: PType, doBind = true): TTypeRelation =
of tyOr:
considerPreviousT:
for branch in f.sons:
if typeRel(c, branch, aOrig) != isNone:
if typeRel(c, branch, aOrig) >= isSubtype:
bindingRet isGeneric
return isNone