mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-17 00:21:28 +00:00
Migrate boxWithJava tests to multi-file framework
This commit is contained in:
20
compiler/testData/codegen/boxWithJava/interfaceDefaultImpls.kt
vendored
Normal file
20
compiler/testData/codegen/boxWithJava/interfaceDefaultImpls.kt
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
// FILE: B.java
|
||||
|
||||
class B {
|
||||
static String test(A x) {
|
||||
return A.DefaultImpls.foo(x);
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: main.kt
|
||||
|
||||
interface A {
|
||||
fun foo() = "OK"
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
val result = B.test(object : A {})
|
||||
if (result != "OK") return "fail: $result"
|
||||
|
||||
return "OK"
|
||||
}
|
||||
Reference in New Issue
Block a user