mirror of
https://github.com/steveicarus/iverilog.git
synced 2026-09-03 08:25:32 +02:00
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]>
22 lines
344 B
Verilog
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
|