Trying to understand the order of new().
Mostly extended class constructed by new() firstly then it assigns to the base class.
Is there any reason not construct base class first then extended class?
C c= new;
D d = c;
module top;
class C;
virtual function void print();
$display("I am C");
endfunction
endclass
class D extends C;
virtual function void print();
$display("I am D");
endfunction
endclass
D d = new;
C c = d;
initial begin
c.print();
$finish;
end
endmodule