mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-10 00:21:35 +00:00
26 lines
351 B
Kotlin
Vendored
26 lines
351 B
Kotlin
Vendored
// !API_VERSION: 1.3
|
|
// !ENABLE_JVM_DEFAULT
|
|
// JVM_TARGET: 1.8
|
|
// WITH_RUNTIME
|
|
|
|
interface Test {
|
|
@JvmDefault
|
|
fun foo(): String = "O"
|
|
|
|
@JvmDefault
|
|
val bar: String
|
|
get() = "K"
|
|
|
|
fun test(): String {
|
|
return (::foo)() + (::bar)()
|
|
}
|
|
}
|
|
|
|
class TestClass : Test {
|
|
|
|
}
|
|
|
|
fun box(): String {
|
|
return TestClass().test()
|
|
}
|