Handling null correctly when wrapping function in SAM wrapper
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
class JavaClass {
|
||||
public static String run(Runnable r) {
|
||||
return r == null ? "OK" : "FAIL";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
fun box(): String {
|
||||
val f: (() -> Unit)? = null
|
||||
return JavaClass.run(f)!!
|
||||
}
|
||||
Reference in New Issue
Block a user