mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-09 08:31:29 +00:00
17 lines
366 B
Kotlin
Vendored
17 lines
366 B
Kotlin
Vendored
// Enable for JS when it supports Java class library.
|
|
// TARGET_BACKEND: JVM
|
|
|
|
class TestJava(r : Runnable) : Runnable by r {}
|
|
class TestRunnable() : Runnable {
|
|
public override fun run() = System.out.println("foobar")
|
|
}
|
|
|
|
fun box() : String {
|
|
var del = TestJava(TestRunnable())
|
|
del.run()
|
|
if (del !is Runnable)
|
|
return "Fail #1"
|
|
|
|
return "OK"
|
|
}
|