hdl.ast: raise a sensible error for xxx in Value
This commit is contained in:
parent
86d14f584e
commit
bf8faea51e
2 changed files with 8 additions and 0 deletions
|
|
@ -377,6 +377,9 @@ class Value(metaclass=ABCMeta):
|
|||
else:
|
||||
raise TypeError(f"Cannot index value with {key!r}")
|
||||
|
||||
def __contains__(self, other):
|
||||
raise TypeError("Cannot use 'in' with an Amaranth value")
|
||||
|
||||
def as_unsigned(self):
|
||||
"""Conversion to unsigned.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue