Files
iverilog/ivtest/ivltests/enum_compatibility7.v
T
Lars-Peter Clausen 300d00b4e2 Add additional enum compatibility tests
Add additional enum compatibility tests that check for compatibility in
different contexts.
 * Array element
 * Function return value
 * Function and task argument
 * struct member
 * class property

Signed-off-by: Lars-Peter Clausen <[email protected]>
2023-01-16 14:45:58 -08:00

27 lines
356 B
Verilog

// Check that assigning to a enum types variable from an enum typed struct
// member works.
module test;
typedef enum reg [31:0] {
A, B
} E;
struct packed {
E e;
} s;
E e;
initial begin
s.e = B;
e = s.e;
if (e === B) begin
$display("PASSED");
end else begin
$display("FAILED");
end
end
endmodule