mirror of
https://github.com/steveicarus/iverilog.git
synced 2026-09-03 06:03:11 +02:00
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]>
22 lines
287 B
Verilog
22 lines
287 B
Verilog
// Check that passing an enum type task argument works.
|
|
|
|
module test;
|
|
|
|
typedef enum reg [31:0] {
|
|
A, B
|
|
} E;
|
|
|
|
task t(E e);
|
|
if (e === B) begin
|
|
$display("PASSED");
|
|
end else begin
|
|
$display("FAILED");
|
|
end
|
|
endtask
|
|
|
|
initial begin
|
|
t(B);
|
|
end
|
|
|
|
endmodule
|