How to find sequence item type?

e.g.
uvm_sequence_item tr1;
transaction_type_A tr2;

$cast(tr2,tr1) will tell me if tr2 is of transaction_type_A .

tried use get_type on EDA playground but got an error.

How do to find the sequence item type of tr2?

How do I print sequence item type for debugging?

In reply to superUVM:

Please show your EDAPlayground code.

In reply to chr_sue:

Inside driver,

task run_phase(uvm_phase phase);

forever
begin
  seq_item_port.get_next_item(req); 
  `uvm_info("MY_TYPE", $sformatf("Sequence Type Is  %p",req.get_type()), UVM_LOW)

This is the info message is follows, (I am sorry it it not an error but does not display the type, I am expecting to print req item type)

KERNEL: UVM_INFO /home/runner/testbench.sv(98) @ 2590: uvm_test_top.m_driver [MY_TYPE] Transmitted frame '{me:circular reference, class already printed}

I want to display req item type without $cast() to debug.

In reply to superUVM:

Simply use
`uvm_info(“MY_TYPE”, $sformatf(“seq_item is %p”,req), UVM_LOW)
This will show you also the class type.