From: whitequark Date: Tue, 21 Jul 2020 02:53:29 +0000 (+0000) Subject: compat.fhdl.bitcontainer: fix value_bits_sign(). X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2d2f4720720c03bc381d14b56c626fdbd1bc2351;p=nmigen.git compat.fhdl.bitcontainer: fix value_bits_sign(). This function was broken in commit 659b0e81; some downstream code expects bits_sign to be e.g. indexable. --- diff --git a/nmigen/compat/fhdl/bitcontainer.py b/nmigen/compat/fhdl/bitcontainer.py index 648b129..4b91572 100644 --- a/nmigen/compat/fhdl/bitcontainer.py +++ b/nmigen/compat/fhdl/bitcontainer.py @@ -18,4 +18,4 @@ def bits_for(n, require_sign_bit=False): @deprecated("instead of `value_bits_sign(v)`, use `v.shape()`") def value_bits_sign(v): - return ast.Value.cast(v).shape() + return tuple(ast.Value.cast(v).shape())