mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-08 08:31:26 +00:00
Migrate boxWithJava tests to multi-file framework
This commit is contained in:
23
compiler/testData/codegen/java8/box/defaultMethodCallViaInterface.kt
vendored
Normal file
23
compiler/testData/codegen/java8/box/defaultMethodCallViaInterface.kt
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
// FILE: Simple.java
|
||||
|
||||
public interface Simple {
|
||||
default String test(String s) {
|
||||
return s + "K";
|
||||
}
|
||||
|
||||
static String testStatic(String s) {
|
||||
return s + "K";
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: main.kt
|
||||
|
||||
interface TestInterface : Simple {}
|
||||
class Test : TestInterface {}
|
||||
|
||||
fun box(): String {
|
||||
val test = Test().test("O")
|
||||
if (test != "OK") return "fail $test"
|
||||
|
||||
return Simple.testStatic("O")
|
||||
}
|
||||
Reference in New Issue
Block a user