mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-09 00:21:47 +00:00
20 lines
289 B
Kotlin
Vendored
20 lines
289 B
Kotlin
Vendored
// IGNORE_BACKEND: JVM_IR
|
|
// FILE: JavaClass.java
|
|
|
|
class JavaClass {
|
|
void invoke(Runnable p1, Runnable p2) {
|
|
p1.run();
|
|
p2.run();
|
|
}
|
|
}
|
|
|
|
// FILE: 1.kt
|
|
|
|
fun box(): String {
|
|
val obj = JavaClass()
|
|
|
|
var v = "FAIL"
|
|
obj({ v = "O" }, { v += "K" })
|
|
return v
|
|
}
|