is there a way to have a unique method for both Ja...
# announcements
e
is there a way to have a unique method for both Java and Kotlin that plays nice with lambda?
Copy code
inline fun method(lambda: () -> Unit) // Java needs at the end `return Unit.INSTANCE;`
void method(Runnable lambda) // Kotlin needs to wrap it into `Runnable { }` and you dont have inline
how?
d
Copy code
void myMethod(Runnable runnable) {
}
r
You should be able to have both java files and kotlin files in any kotlin project. Obviously not in the same file
e
I'd lose the
inline
s
not on the Kotlin side. Do you try to trick Java into inlining?
t
I'd remove Java 😆