mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-09 00:21:47 +00:00
25 lines
402 B
Kotlin
Vendored
25 lines
402 B
Kotlin
Vendored
// IGNORE_BACKEND: JVM_IR
|
|
// FILE: JavaClass.java
|
|
|
|
class JavaClass<T> {
|
|
protected void execute(T t, Runnable r) {
|
|
r.run();
|
|
}
|
|
}
|
|
|
|
// FILE: 1.kt
|
|
|
|
internal class KotlinClass : JavaClass<String>() {
|
|
fun doIt(): String {
|
|
var result = ""
|
|
execute("") {
|
|
result = "OK"
|
|
}
|
|
return result
|
|
}
|
|
}
|
|
|
|
fun box(): String {
|
|
return KotlinClass().doIt()
|
|
}
|