07-20-2023, 03:41 PM
I am trying to call the following Kotlin function from Java
override fun First(list: LinqList<ElementType>, condition: (ElementType) -> Boolean) : ElementType
like this
int first = list.First(list,(x) -> x == 5);
but i get the following error
Error java: cannot access kotlin.jvm.functions.Function1
class file for kotlin.jvm.functions.Function1 not found
I have tried googling it but i can not find the answer anywhere
Thanks in advance
override fun First(list: LinqList<ElementType>, condition: (ElementType) -> Boolean) : ElementType
like this
int first = list.First(list,(x) -> x == 5);
but i get the following error
Error java: cannot access kotlin.jvm.functions.Function1
class file for kotlin.jvm.functions.Function1 not found
I have tried googling it but i can not find the answer anywhere
Thanks in advance