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
280 B
Verilog
15 lines
280 B
Verilog
// Check that an error is reported when a void function is used in an expression
|
|
|
|
module test;
|
|
|
|
function void f;
|
|
endfunction
|
|
|
|
initial begin
|
|
int x;
|
|
x = f() + 1; // This should fail, void function can not be used in expression
|
|
$display("FAILED");
|
|
end
|
|
|
|
endmodule
|