summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2014-04-20 13:59:38 +0200
committerAraq <rumpf_a@web.de>2014-04-20 13:59:38 +0200
commit39e4e3f20570e804e3059574eafe8f78b2d8a9df (patch)
tree3e028e912458865d7507a8a706c8816c99c24b70
parentc80d563afb7e095b6e9ca4353fb02ae7586ed500 (diff)
downloadNim-39e4e3f20570e804e3059574eafe8f78b2d8a9df.tar.gz
fixes OR for int8|int16 etc
-rw-r--r--compiler/sigmatch.nim4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/sigmatch.nim b/compiler/sigmatch.nim
index 673c7f083..4b91a067e 100644
--- a/compiler/sigmatch.nim
+++ b/compiler/sigmatch.nim
@@ -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