Files
kotlin/compiler/testData/codegen/java8/box/jvm8/defaults/callableReference.kt
Mikhael Bogdanov a28a0beaea Initial support of @JvmDefault
(cherry picked from commit fe45eb2)
2018-04-03 19:46:16 +02:00

25 lines
366 B
Kotlin
Vendored

// !API_VERSION: 1.3
// JVM_TARGET: 1.8
// WITH_RUNTIME
interface Test {
@kotlin.annotations.JvmDefault
fun foo(): String = "O"
@kotlin.annotations.JvmDefault
val bar: String
get() = "K"
fun test(): String {
return (::foo)() + (::bar)()
}
}
class TestClass : Test {
}
fun box(): String {
return TestClass().test()
}