iverilog/ivtest/ivltests/func_void_in_expr_fail.v

15 lines
280 B
Coq
Raw Normal View History

// 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