Skip to content

Commit fa49320

Browse files
rroohhhwhitequark
authored andcommitted
hdl._ast.Shape: cast width to int
fixes #1608
1 parent 9167910 commit fa49320

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

amaranth/hdl/_ast.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ def __init__(self, width=1, signed=False):
7373
f"not {width}")
7474
if signed and width <= 0:
7575
raise TypeError(f"Width of a signed value must be a positive integer, not {width}")
76-
self._width = width
76+
self._width = operator.index(width)
7777
self._signed = bool(signed)
7878

7979
@property

0 commit comments

Comments
 (0)