Add regression test for using packed scoped type identifier in class
Check that it is possible to use a packed scope type identifier for the type of a class property when the class is defined in the unit scope. This makes sure that the elaboration is done in an order so that the type is available when the class property is elaborated. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
This commit is contained in:
parent
68d89bbe05
commit
fbfb6016c1
|
|
@ -0,0 +1,23 @@
|
|||
// Check that it is possible to use a package scope type identifier for the type
|
||||
// of a property of class defined in the root scope
|
||||
|
||||
package P;
|
||||
typedef integer T;
|
||||
endpackage
|
||||
|
||||
class C;
|
||||
P::T x;
|
||||
endclass
|
||||
|
||||
module test;
|
||||
C c;
|
||||
initial begin
|
||||
c = new;
|
||||
c.x = 32'h55aa55aa;
|
||||
if (c.x === 32'h55aa55aa) begin
|
||||
$display("PASSED");
|
||||
end else begin
|
||||
$display("FAILED");
|
||||
end
|
||||
end
|
||||
endmodule
|
||||
|
|
@ -640,6 +640,7 @@ sv_ps_type1 normal,-g2009 ivltests
|
|||
sv_ps_type_cast1 normal,-g2009 ivltests
|
||||
sv_ps_type_cast2 normal,-g2009 ivltests
|
||||
sv_ps_type_class1 normal,-g2009 ivltests
|
||||
sv_ps_type_class_prop normal,-g2009 ivltests
|
||||
sv_ps_type_enum1 normal,-g2009 ivltests
|
||||
sv_ps_type_expr1 normal,-g2009 ivltests
|
||||
sv_ps_type_expr2 normal,-g2009 ivltests
|
||||
|
|
|
|||
|
|
@ -440,6 +440,7 @@ sv_port_default7 CE,-g2009,-pallowsigned=1 ivltests
|
|||
sv_port_default8 CE,-g2009,-pallowsigned=1 ivltests
|
||||
sv_port_default9 CE,-g2009 ivltests
|
||||
sv_ps_type_class1 CE,-g2009 ivltests
|
||||
sv_ps_type_class_prop CE,-g2009 ivltests
|
||||
sv_root_class CE,-g2009 ivltests
|
||||
sv_typedef_fwd_class CE,-g2009 ivltests
|
||||
sv_typedef_fwd_class2 CE,-g2009 ivltests
|
||||
|
|
|
|||
Loading…
Reference in New Issue