Comparing types returned by get_type()

It’s illegal because get_type() returns a handle to a proxy object of type uvm_component_registry#(T1,“T1”) and uvm_component_registry#(T2,“T2”). You can’t compare handles of different types.

What you really want is

if (type(T1) != type(T2) ) <do something>.

Are you sure VCS does not support this? This has been in the LRM since 1800-2005

If you want to compare the types of two constructed UVM objects, you can use the virtual method get_object_type()

if ( t1_h.get_object_type() != t2_h.get_object_type() ) <do_something>;