Fixed calling inherited SAM adapter.
This commit is contained in:
@@ -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
|
||||
}
|
||||
Reference in New Issue
Block a user