Files
kotlin/compiler/testData/codegen/boxAgainstJava/sam/adapters/inheritedSimple.kt
2016-03-02 15:47:36 +03:00

21 lines
283 B
Kotlin
Vendored

// FILE: Sub.java
class Super {
void safeInvoke(Runnable r) {
if (r != null) r.run();
}
}
class Sub extends Super {
}
// FILE: 1.kt
fun box(): String {
var r = "FAIL"
val sub = Sub()
sub.safeInvoke(null)
sub.safeInvoke { r = "OK" }
return r
}