mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-09 08:31:29 +00:00
Added sam test on java8 interface with default method
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
class JavaCall {
|
||||
String call(Test test) {
|
||||
return test.call();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
interface Test {
|
||||
|
||||
String call();
|
||||
|
||||
default String test() {
|
||||
return "K";
|
||||
}
|
||||
|
||||
static String testStatic() {
|
||||
return "K";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fun box(): String {
|
||||
return JavaCall().call {"OK"}
|
||||
}
|
||||
Reference in New Issue
Block a user