mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-09 15:53:37 +00:00
Supported calls of SAM adapters for constructors.
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
class JavaClass {
|
||||
private Runnable r;
|
||||
|
||||
public JavaClass(Runnable r) {
|
||||
this.r = r;
|
||||
}
|
||||
|
||||
public void run() {
|
||||
r.run();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
fun box(): String {
|
||||
var v = "FAIL"
|
||||
JavaClass { v = "OK" }.run()
|
||||
return v
|
||||
}
|
||||
Reference in New Issue
Block a user