enum Borders
Top = 1
Right = 2
Bottom = 4
Left = 8
class Test
def main is shared
borders = Borders(Top,Left)
assert (borders & Borders.Top) == Borders.Top
- Code: Select all
test.cobra(10): error: Cannot apply AMPERSAND to Borders. Try finding a method that performs this function.
Compilation failed - 1 error, 0 warnings
is there any support for bitwise operators on enum without casting every operand to int?