In SystemVerilog, I have a base class A and derived class B, C, D. I would like to create an array of type A which has handles to B, C, D. Is there a more succinct way to do this then my ugly solution below?
module test;
A arr[3];
B b;
C c;
D d;
initial begin
b = new();
c = new();
d = new();
arr[0] = b;
arr[1] = c;
arr[2] = d;
end
endmodule