Fixed calling inherited SAM adapter.

This commit is contained in:
Evgeny Gerashchenko
2013-04-30 17:19:50 +04:00
parent fed5cf6524
commit 516a5b76e8
5 changed files with 48 additions and 3 deletions
@@ -0,0 +1,8 @@
class Super {
void safeInvoke(Runnable r) {
if (r != null) r.run();
}
}
class Sub extends Super {
}
@@ -0,0 +1,7 @@
fun box(): String {
var r = "FAIL"
val sub = Sub()
sub.safeInvoke(null)
sub.safeInvoke { r = "OK" }
return r
}