From d3f2c5b079249ea983f5b9f772a1867cb6f44e1c Mon Sep 17 00:00:00 2001 From: Robin Ole Heinemann Date: Thu, 19 Jun 2025 12:09:59 +0200 Subject: [PATCH] hdl._ast.Shape: cast width to int fixes #1608 --- amaranth/hdl/_ast.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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