mirror of
https://github.com/steveicarus/iverilog.git
synced 2026-09-03 01:13:47 +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]>
18 lines
289 B
Verilog
18 lines
289 B
Verilog
// Check that an error is reported for implicit cast to enum when assigning
|
|
// to an array element.
|
|
|
|
module test;
|
|
|
|
typedef enum reg [31:0] {
|
|
A, B
|
|
} E;
|
|
|
|
E ea[2];
|
|
|
|
initial begin
|
|
ea[0] = 10; // This should fail. Implicit cast to enum.
|
|
$display("FAILED");
|
|
end
|
|
|
|
endmodule
|