fixes OR for int8|int16 etc

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

View file

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