00821bbc63
They are a bit redundant, but it needs additional work to be done to avoid them
31 lines
576 B
Kotlin
Vendored
31 lines
576 B
Kotlin
Vendored
// FILE: KotlinFile.kt
|
|
class KotlinClass {
|
|
public fun doSomething(runnable: Runnable) { runnable.run() }
|
|
}
|
|
|
|
public interface I {
|
|
public fun doIt()
|
|
}
|
|
|
|
fun foo(javaClass: JavaClass, kotlinClass: KotlinClass) {
|
|
javaClass.doSomething {
|
|
bar()
|
|
}
|
|
|
|
kotlinClass.doSomething {
|
|
bar()
|
|
}
|
|
|
|
javaClass.doSomething2 <!ARGUMENT_TYPE_MISMATCH!>{
|
|
bar()
|
|
}<!>
|
|
}
|
|
|
|
fun bar(){}
|
|
|
|
// FILE: JavaClass.java
|
|
public class JavaClass {
|
|
public void doSomething(Runnable runnable) { runnable.run(); }
|
|
public void doSomething2(I i) { i.doIt(); }
|
|
}
|