Files
iverilog/ivtest/ivltests/sv_ps_function_fail2.v
T
Lars-Peter Clausen 5563dc6250 Add regression tests for package scoped function call errors
Check that an error is reported, rather than crashing, when trying to do a
package scoped function call when the function does not exist in the
package or is not a function.

Signed-off-by: Lars-Peter Clausen <[email protected]>
2022-12-29 10:54:42 -08:00

17 lines
267 B
Verilog

// Check that trying to call a package scoped variable as a function results in
// an error.
package P;
int x;
endpackage
module test;
initial begin
int y;
y = P::x(10); // This should fail, x is not a function
$display("FAILED");
end
endmodule