mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-09 00:21:47 +00:00
12 lines
172 B
Kotlin
12 lines
172 B
Kotlin
open data class A(open val x: String)
|
|
|
|
class B : A("Fail") {
|
|
override val x: String = "OK"
|
|
}
|
|
|
|
fun foo(a: A) = a.component1()
|
|
|
|
fun box(): String {
|
|
return foo(B())
|
|
}
|