hdl.ast: Do not warn on int Enums in Cat.
This aligns with the behavior for plain Enums.
This commit is contained in:
parent
58a0c68279
commit
de6b69370f
2 changed files with 10 additions and 1 deletions
|
|
@ -860,7 +860,7 @@ class Cat(Value):
|
|||
super().__init__(src_loc_at=src_loc_at)
|
||||
self.parts = []
|
||||
for index, arg in enumerate(flatten(args)):
|
||||
if isinstance(arg, int) and arg not in [0, 1]:
|
||||
if isinstance(arg, int) and not isinstance(arg, Enum) and arg not in [0, 1]:
|
||||
warnings.warn("Argument #{} of Cat() is a bare integer {} used in bit vector "
|
||||
"context; consider specifying explicit width using C({}, {}) instead"
|
||||
.format(index + 1, arg, arg, bits_for(arg)),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue