Files
kotlin/compiler/testData/codegen/java8/box/jvm8/defaults/inlineProperty.kt
Mikhael Bogdanov 2cd5bd4d83 Update test data
(cherry picked from commit 08ff1de)
2018-04-03 19:47:12 +02:00

31 lines
492 B
Kotlin
Vendored

// !API_VERSION: 1.3
// !ENABLE_JVM_DEFAULT
// JVM_TARGET: 1.8
// WITH_RUNTIME
interface Test {
@JvmDefault
fun test(): String {
return inlineProp
}
fun testDefaultImpls(): String {
return inlineProp
}
@JvmDefault
private inline val inlineProp: String
get() = "OK"
}
class TestClass : Test {
}
fun box(): String {
val foo = TestClass()
if (foo.test() != "OK") return "fail: ${foo.test()}"
return foo.testDefaultImpls()
}