mirror of
https://github.com/enjoy-digital/litex.git
synced 2025-01-04 09:52:26 -05:00
Raise exception when not using correct boolean operators
This commit is contained in:
parent
86abb253c8
commit
286092b62e
1 changed files with 3 additions and 0 deletions
|
@ -24,6 +24,9 @@ class Value(HUID):
|
||||||
Values created from integers have the minimum bit width to necessary to
|
Values created from integers have the minimum bit width to necessary to
|
||||||
represent the integer.
|
represent the integer.
|
||||||
"""
|
"""
|
||||||
|
def __bool__(self):
|
||||||
|
raise NotImplementedError("For boolean operations between expressions: use '&'/'|' instead of 'and'/'or'")
|
||||||
|
|
||||||
def __invert__(self):
|
def __invert__(self):
|
||||||
return _Operator("~", [self])
|
return _Operator("~", [self])
|
||||||
def __neg__(self):
|
def __neg__(self):
|
||||||
|
|
Loading…
Reference in a new issue