Files
iverilog/ivtest/ivltests/sv_class_method_lt_static2.v
T
Lars-Peter Clausen 748d6d8de2 Add regression tests for class methods with static lifetime
Check that trying to specify a class method with static lifetime results in
an error.

Signed-off-by: Lars-Peter Clausen <[email protected]>
2022-12-21 19:28:46 -08:00

20 lines
350 B
Verilog

// Check that specifing static lifetime for a class method function results in
// an error.
module test;
class C;
// This should fail, all class methods have automatic lifetime
function static int t(int x);
int y;
y = 2 * x;
return y;
endfunction
endclass
initial begin
$display("FAILED");
end
endmodule