Factory type override of sequence item does not work

In reply to chrisspear:

As I had replied earlier : To access the extended class property a dynamic cast would be required .


virtual task drive(input mem_seq_item trans );
 child_seq_item  ext_item ;

    `DRIV_IF.wr_en <= 0;
    `DRIV_IF.rd_en <= 0;
    @(posedge vif.DRIVER.clk);
 
    if ( $cast( ext_item , trans ) ) begin

      `DRIV_IF.addr <= ext_item.A;
       .........
    end

My last reply was related to your comments " then the sequence and sequencer also need to be specialized with the derived type."

I do agree that the way driver logic has been coded , it would be better to specialize driver , sequencer and sequence with extended type parameterization .

But if the user insists of using base type parameterization and use a factory override , they would require to add the $cast logic within driver class .