Changeset 1818
- Timestamp:
- 12/08/08 07:29:18 (3 years ago)
- Location:
- cobra/trunk
- Files:
-
- 2 modified
-
Source/BinaryOpExpr.cobra (modified) (1 diff)
-
Tests/100-basics/310-enums-combine.cobra (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
cobra/trunk/Source/BinaryOpExpr.cobra
r1768 r1818 342 342 else if _left.isKindOf(tpassthrough) or _right.isKindOf(tpassthrough) 343 343 _type = tpassthrough 344 else if leftType == rightType and leftType inherits EnumDecl 345 _type = leftType 344 346 else if cannotMix 345 347 .throwError('Cannot mix types [_left.type.name] and [_right.type.name] for arithmetic.') -
cobra/trunk/Tests/100-basics/310-enums-combine.cobra
r1428 r1818 12 12 .takeColor(Color(Red, Green)) 13 13 # TODO: Should have a qualified example. System.SomeEnum(MemberA, MemberB) and System.Something.SomeEnum(MemberA, MemberB) 14 15 # testing enum membership with bitwise-and 16 assert c & Color.Red == Color.Red 17 assert c & Color.Green == Color.Green 18 assert c & Color.Blue <> Color.Blue 14 19 15 20 def takeColor(c as Color) is shared



