Add regression test for referencing forward declared classes

Check that it is possible to use a forward declared class type as the type
of a property in another class.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
This commit is contained in:
Lars-Peter Clausen 2022-10-01 17:03:56 +02:00
parent b4b591adba
commit 68d89bbe05
3 changed files with 24 additions and 0 deletions

View File

@ -0,0 +1,22 @@
// Check that it is possible to use a forward declared class type as the type of
// a property in another class.
module test;
typedef class B;
class C;
B b;
endclass
class B;
endclass
C c;
initial begin
c = new;
$display("PASSED");
end
endmodule

View File

@ -724,6 +724,7 @@ sv_typedef_darray_base3 normal,-g2009 ivltests
sv_typedef_darray_base4 normal,-g2009 ivltests
sv_typedef_fwd_base normal,-g2009 ivltests
sv_typedef_fwd_class normal,-g2009 ivltests
sv_typedef_fwd_class2 normal,-g2009 ivltests
sv_typedef_fwd_union normal,-g2009 ivltests
sv_typedef_fwd_union_fail CE,-g2009 ivltests
sv_typedef_fwd_enum1 normal,-g2009 ivltests

View File

@ -442,6 +442,7 @@ sv_port_default9 CE,-g2009 ivltests
sv_ps_type_class1 CE,-g2009 ivltests
sv_root_class CE,-g2009 ivltests
sv_typedef_fwd_class CE,-g2009 ivltests
sv_typedef_fwd_class2 CE,-g2009 ivltests
sv_typedef_fwd_enum3 CE,-g2009 ivltests
sv_typedef_scope3 CE,-g2009 ivltests
sv_unit2b CE,-g2009 ivltests