veryl icon indicating copy to clipboard operation
veryl copied to clipboard

Veryl compiler accepts using a period to access the variant of an `enum`

Open puppuccino opened this issue 9 months ago • 0 comments

I noticed that Veryl compiler accepts using a period instead of double colon to access the variant of an enum, which it shouldn't.

package foobar_pkg {

    enum FooBar: logic {
        Foo,
        Bar,
    }
}

module module_a (
    i: input  foobar_pkg::FooBar,
    o: output logic             ,
) {
    import foobar_pkg::FooBar;
    assign o = case i {
        FooBar.Foo: 1'b0,
        FooBar.Bar: 1'b1,
        default   : 1'bz,
    };
}

puppuccino avatar May 07 '24 15:05 puppuccino