Files
iverilog/ivtest/ivltests/func_nested_block_nb_fail.v
T
Lars-Peter Clausen de415b2f03 Add regression tests for nested function and final contexts
Check that statements that are not allowed in functions or final procedures
are still rejected when they are placed in a named block scope.

Signed-off-by: Lars-Peter Clausen <[email protected]>
2026-06-09 21:34:34 -07:00

22 lines
292 B
Verilog

// Check that function context is preserved when elaborating nested blocks.
module test;
reg x;
integer y;
function integer f;
input a;
begin : nested
x <= a;
f = 0;
end
endfunction
initial begin
y = f(1'b1);
$display("FAILED");
end
endmodule