mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-09 15:53:37 +00:00
20 lines
291 B
Kotlin
Vendored
20 lines
291 B
Kotlin
Vendored
// IGNORE_BACKEND: JVM_IR
|
|
// FILE: JavaClass.java
|
|
|
|
class JavaClass {
|
|
void set(Runnable i, Runnable value) {
|
|
i.run();
|
|
value.run();
|
|
}
|
|
}
|
|
|
|
// FILE: 1.kt
|
|
|
|
fun box(): String {
|
|
val obj = JavaClass()
|
|
|
|
var v = "FAIL"
|
|
obj[{ v = "O" }] = { v += "K" }
|
|
return v
|
|
}
|