Add regression test for `super` access error

Check that access through `super` is rejected when the current class has no
parent class.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
This commit is contained in:
Lars-Peter Clausen 2026-05-11 08:52:09 -07:00
parent cdb9bc2c21
commit e4afd6dc25
3 changed files with 17 additions and 0 deletions

View File

@ -0,0 +1,11 @@
// Check that `super` access in a class without a parent class is rejected.
module test;
class C;
function void f;
super.x = 1;
endfunction
endclass
endmodule

View File

@ -288,6 +288,7 @@ sv_package_lifetime vvp_tests/sv_package_lifetime.json
sv_package_lifetime_fail vvp_tests/sv_package_lifetime_fail.json
sv_parameter_type vvp_tests/sv_parameter_type.json
sv_queue_assign_op vvp_tests/sv_queue_assign_op.json
sv_super_member_fail vvp_tests/sv_super_member_fail.json
sv_wildcard_import8 vvp_tests/sv_wildcard_import8.json
sdf_header vvp_tests/sdf_header.json
task_return1 vvp_tests/task_return1.json

View File

@ -0,0 +1,5 @@
{
"type" : "CE",
"source" : "sv_super_member_fail.v",
"iverilog-args" : [ "-g2005-sv" ]
}