Files
iverilog/ivtest/ivltests/enum_in_struct.v
T
Lars-Peter Clausen d856a35e4d Add regression test for enums declared in structs and classes
These tests check that a enum that is declared in a struct or class are
correctly elaborated and also name collisions with the enum names are
detected.

Signed-off-by: Lars-Peter Clausen <[email protected]>
2022-01-15 21:43:01 +01:00

22 lines
344 B
Verilog

// Check that when a enum type is declared inside a struct that the enum is
// properly installed in the scope and the enum items are available
module test;
struct packed {
enum integer {
A
} e;
} s;
initial begin
s.e = A;
if (s.e == A) begin
$display("PASSED");
end else begin
$display("FAILED");
end
end
endmodule