Error-[ICTTFC] Incompatible complex type usage

Hi,

I am setting the config object in the build phase of base test and getting it inside the sequence using m_sequencer handle.

Code Below,
Base Test:
de_slave_config=i3c_slave_config::type_id::create(“de_slave_config”);
set_config_object(“*”,“i3c_slave_config”,slave_config,0);
Sequence:

m_sequencer.get_config_object(“i3c_slave_config”,slave_config,0);

Suppose If I use the same handle which I used in the base test in the (ovm_object value → de_slave_config ,m_sequencer.get_config_object(“i3c_slave_config”,de_slave_config,0);) field , I am not seeing this error.
Slave_config is a just a handle to collect the object address.

Why I am seeing this error if I use different name in ovm_object value field.

Error Msg:
Error-[ICTTFC] Incompatible complex type usage

Incompatible complex type usage in task or function call.
The following expression is incompatible with the formal parameter of the
function. The type of the actual is ‘class
LPIO_SB_I3C_MS_ENV_LIB.lpio_pkg::i3c_slave_config’, while the type of the
formal is ‘class OVM_VAL_LIB.ovm_pkg::ovm_object’. Expression: slave_config
Source info: this.m_sequencer.get_config_object(“i3c_slave_config”,
slave_config, 0)

Thanks
Venkatesh

In reply to muthuven:

The error message tells you that you are trying to downcast the handle without using $cast.
See Why downcasting is not allowed in SystemVerilog? | Verification Academy

In reply to dave_59:

Thanks Dave for the reply.

Resolved it now.