mirror of
https://github.com/steveicarus/iverilog.git
synced 2026-09-05 16:56:06 +02:00
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]>
17 lines
329 B
Verilog
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
|