I am new to Kotlin. I am facing the following problem. I have a function like this,
fun updateAfterFind(updateColumn:Map<Column<*>, Any?>): Boolean{
ExposedUser.update( {ExposedUser.id eq 123} ){
for (column in updateColumn){
it[column.key] = column.value
}
}
return true;
}
The column.value
is of type Any?. Still I am getting the following error,
I have also tried casting, column.name as Any?
. But it didn't helped.
After doing gradle build
I got the following error,
Type inference failed: Cannot infer type parameter S in fun <S> set(column: Column<S>, value: S?): Unit
None of the following substitutions
(Column<CapturedTypeConstructor(*)>,CapturedTypeConstructor(*)?)
(Column<Any>,Any?)
can be applied to
(Column<*>,Any)