hdl.ast: recursively cast ValueCastable objects to values.

This commit is contained in:
Catherine 2022-04-05 21:29:36 +00:00
parent 3b799481f7
commit 0723f6bac9
3 changed files with 41 additions and 15 deletions

View file

@ -220,7 +220,7 @@ Value casting
Like shapes, values may be *cast* from other objects, which are called *value-castable*. Casting allows objects that are not provided by Amaranth, such as integers or enumeration members, to be used in Amaranth expressions directly.
.. TODO: link to UserValue
.. TODO: link to ValueCastable
Casting to a value can be done explicitly with ``Value.cast``, but is usually implicit, since value-castable objects are accepted anywhere values are.