Files
iverilog/ivtest/ivltests/enum_compatibility_fail1.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

22 lines
320 B
Verilog

// Check that enums declared within a module are not compatible between
// different instances of a module
module M;
enum integer {
A
} e;
endmodule
module test;
M m1();
M m2();
initial begin
// These are different types and not compatible
m1.e = m2.e;
$display("FAILED");
end
endmodule