title: Error: Type of the parameter must be a class annotated with @Entity or a collection/array
body: <p>I know that some have already posted this topic but after reviewed all the given answer, I can not find anything suit my case. I would be happy if someone can help me resolving my case.</p>
  <p>I started getting my build failed as I've updated my Kotlin lib from 1.5.31 to 1.6.0. My Android Room <code>BaseDao</code> class can’t be compiled again. Below my <code>BaseDao</code> class:</p>
  <pre class="lang-kotlin prettyprint-override"><code>interface BaseDao&lt;T&gt; {
      /**
       * Insert an object in the database.
       *
       */
      @Insert(onConflict = OnConflictStrategy.IGNORE)
      suspend fun insert(obj: T): Long
  
      /**
       * Insert an array of objects in the database.
       *
       * @param obj the objects to be inserted.
       */
      @Insert
      suspend fun insert(vararg obj: T): LongArray
  
      /**
       * Update an object from the database.
       *
       * @param obj the object to be updated
       */
      @Update(onConflict = OnConflictStrategy.REPLACE)
      suspend fun update(obj: T)
  
      /**
       * Delete an object from the database
       *
       * @param obj the object to be deleted
       */
      @Delete
      suspend fun delete(obj: T)
  }
  
  @Transaction
  suspend inline fun &lt;reified T&gt; BaseDao&lt;T&gt;.insertOrUpdate(item: T) {
      if (insert(item) != -1L) return
      update(item)
  }
  </code></pre>
  <p>After build:</p>
  <blockquote>
  <p>BaseDao.java:19: error: Type of the parameter must be a class annotated with @Entity or a collection/array of it.<br>
  kotlin.coroutines.Continuation&lt;? super java.lang.Long&gt; continuation);<br>
  error: Not sure how to handle insert method’s return type.<br>
  public abstract java.lang.Object insert(T obj, @org.jetbrains.annotations.NotNull()</p>
  </blockquote>
  <p>This is how i call my <code>BaseDao</code> in one of my <code>Dao</code> class:</p>
  <pre class="lang-kotlin prettyprint-override"><code>@Dao
  interface CustomDao : BaseDao&lt;CustomEntity&gt; {
     
  }
  </code></pre>
  <p>I've tried <code>@JvmSuppressWildcards</code> but it doesn't help me.</p>