Type compatibility error

hi,

I am getting the following error from Cadence simulator, when i create a data packet class instance as a queue and in my scoreboard, i am trying to do:

In my scoreboard class , i am declaring the data class instance as shown below:

 CC_data      ccDataExpQ[$];
 CC_data      ccData;
 CC_data      ccDatatmpQ[$];

************
 ccDatatmpQ = ccDataExpQ.find_first_index(item) with (item.o_data_0 == smemData.i_data);
  ccDataExpQ.delete();
  if(ccDatatmpQ.size()) begin
    $display("PASS");
    ccDatatmpQ.delete();
************
                                                   |

xmvlog: *E,TYCMPAT (/certain/pqr/cw/ru/r/s/d/tb/lib/er/sv/mYscoreboard.svh,125|41): assignment operator type check failed (expecting datatype compatible with ‘queue of class mYenv_pkg::CC_data’ but found ‘queue of int’ instead).
package worklib.mYenv_pkg:sv
errors: 1, warnings: 0

The error points to ccDataExpQ in the code that i have pasted:

ccDatatmpQ = ccDataExpQ.find_first_index(item) with (item.o_data_0 == smemData.i_data);

My data class is a simple class extended from uvm_object as shown below:

class CC_data extends uvm_object;
  
  rand         bit [31:0]   o_data_0 ;
    
  `uvm_object_utils(CC_data)
     
  //Constructor
  function new(string name = "CC_data");
    super.new(name);
  endfunction
  
endclass

Any hits are highly appreciated to debug this error.

In reply to Rahul_Bharadwaj:

From the IEEE1800-2017 LRM:

Index locator methods return a queue of int for all arrays except associative arrays, which return a queue of
the same type as the associative index type. Associative arrays that specify a wildcard index type shall not be
allowed.

  • find_first_index() returns the index of the first element satisfying the given expression

As the error message explains, you are trying to assign a queue of int to a queue of CC_data.

In reply to cgales:

Thanks a lot. I know the mistake i did. I created a different queue of int type and then made the assignment. It worked !!