Can I use an extend class in function with an arguments?

In reply to verified:

No, basically, you can’t pass a parent class to an argument which is child class type.
To solve this error, you can create function with parent class argument:


  function void disp( A a);
    a.disp();
    a.vdisp();
  endfunction

  // Call it
  disp(my_a); 
  disp(my_ea);