Files
iverilog/ivtest/ivltests/sv_ap_struct_fail2.v
T
Lars-Peter Clausen 6ae085812d Add regression tests for struct assignment patterns
Check that struct assignment patterns with only positional arguments are
supported. Also check that invalid assignment patterns for structs report
an error.

Signed-off-by: Lars-Peter Clausen <[email protected]>
2023-02-04 14:32:51 -08:00

17 lines
329 B
Verilog

// Check that it is an error to provide more elements in a struct assignment
// pattern than there are members in the struct.
module test;
struct packed {
int x;
shortint y;
byte z;
} x = '{1, 2, 3, 4}; // This should fail. More elements than required.
initial begin
$display("FAILED");
end
endmodule