diff --git a/amaranth/hdl/_ast.py b/amaranth/hdl/_ast.py index 3f87e9e44..37dd21c66 100644 --- a/amaranth/hdl/_ast.py +++ b/amaranth/hdl/_ast.py @@ -73,7 +73,7 @@ def __init__(self, width=1, signed=False): f"not {width}") if signed and width <= 0: raise TypeError(f"Width of a signed value must be a positive integer, not {width}") - self._width = width + self._width = operator.index(width) self._signed = bool(signed) @property