How to assign value to the function from different class with different enum

In reply to dave_59:

Hi Dave, I have one more question

I had tried the following

`uvm_info(this.get_type_name(), $sformatf("Type is %s", enum_common_type'(xact_type)), UVM_NONE)
`uvm_info(this.get_type_name(), $sformatf("Type is %s", xt), UVM_NONE)
`uvm_info(this.get_type_name(), $sformatf("Type is %s", xt.name()), UVM_NONE)

and I got the result

  1. Type is @#$% (garbled code)
  2. Type is WRITE
  3. Type is WRITE

May I know why is 1 not working?

Thank you