mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-08 15:53:19 +00:00
Migrate boxWithJava tests to multi-file framework
This commit is contained in:
28
compiler/testData/codegen/java8/box/samOnInterfaceWithDefaultMethod.kt
vendored
Normal file
28
compiler/testData/codegen/java8/box/samOnInterfaceWithDefaultMethod.kt
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
// FILE: JavaCall.java
|
||||
|
||||
class JavaCall {
|
||||
String call(Test test) {
|
||||
return test.call();
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: Test.java
|
||||
|
||||
interface Test {
|
||||
|
||||
String call();
|
||||
|
||||
default String test() {
|
||||
return "K";
|
||||
}
|
||||
|
||||
static String testStatic() {
|
||||
return "K";
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: sam.kt
|
||||
|
||||
fun box(): String {
|
||||
return JavaCall().call {"OK"}
|
||||
}
|
||||
Reference in New Issue
Block a user