circt
circt copied to clipboard
[FIRRTL] Produce Better Error Message For Incorrect Enum FIRRTL Text
The following is currently failing:
FIRRTL version 4.0.0
circuit Foo:
module Foo:
wire x: UInt<8>
node y = {|some: UInt<8>, None|}(Some, x)
~The problem is that this is parsing Some, x) as the "tag" and then trying to look that. This is then an illegal tag and it errors out.~
See the comment below. This is illegal IR that trips an assert in a builder.
False alarm on this one---some and Some do not match, therefore this is malformed IR. This should produce a better error message when this does happen, though. Currently this is tripping an assertion in the builder which, in a release build, looks like it would blind dereference an optional type. 😬