How to get type name on systemVerilog

In reply to uvm_share:

What is the simulator command line you are using?
It works with these commands:
vlog test.sv test.c
vopt top -o top_opt
vsim -c -do “run -all; quit -f” top_opt