mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-09 15:53:37 +00:00
17 lines
365 B
Kotlin
Vendored
17 lines
365 B
Kotlin
Vendored
// Enable for JS when it supports Java class library.
|
|
// IGNORE_BACKEND: JS
|
|
|
|
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"
|
|
}
|