Wiki
Show
Ignore:
Timestamp:
12/08/08 07:29:18 (3 years ago)
Author:
Chuck.Esterbrook
Message:

Support bitwise-and for testing enums.
reported-by:gauthier

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • cobra/trunk/Source/BinaryOpExpr.cobra

    r1768 r1818  
    342342        else if _left.isKindOf(tpassthrough) or _right.isKindOf(tpassthrough) 
    343343            _type = tpassthrough 
     344        else if leftType == rightType and leftType inherits EnumDecl 
     345            _type = leftType 
    344346        else if cannotMix 
    345347            .throwError('Cannot mix types [_left.type.name] and [_right.type.name] for arithmetic.')