Skip to content

Commit

Permalink
Add another test
Browse files Browse the repository at this point in the history
Signed-off-by: Ryszard Rozak <[email protected]>
  • Loading branch information
RRozak committed Oct 27, 2023
1 parent e3a5171 commit a1c7456
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test_regress/t/t_castdyn.v
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ endclass
class BasedA extends Base;
endclass
class BasedB extends Base;
static function BasedB getBasedB(bit getNull);
BasedB b = new;
return getNull ? null : b;
endfunction
endclass

module t (/*AUTOARG*/);
Expand Down Expand Up @@ -61,6 +65,12 @@ module t (/*AUTOARG*/);
if (i != 1) $stop;
if (b != bb) $stop;

bb = BasedB::getBasedB(1);
b = bb;
i = $cast(bbo, b);
if (i != 1) $stop;
if (b != bb) $stop;

bb = new;
b = bb;
bao = ba;
Expand Down

0 comments on commit a1c7456

Please sign in to comment.