mirror of
https://github.com/steveicarus/iverilog.git
synced 2026-09-03 03:03:08 +02:00
Check that an error is reported when either calling a task or a void function as part of an expression. Signed-off-by: Lars-Peter Clausen <[email protected]>
15 lines
249 B
Verilog
15 lines
249 B
Verilog
// Check that an error is reported when a task is used in an expression
|
|
|
|
module test;
|
|
|
|
task t;
|
|
endtask
|
|
|
|
initial begin
|
|
int x;
|
|
x = t() + 1; // This should fail, task can not be used in expression
|
|
$display("FAILED");
|
|
end
|
|
|
|
endmodule
|