Files
kotlin-fork/compiler/testData/codegen/dataClasses/tostring/overriddenProperty.kt
T

12 lines
199 B
Kotlin

open data class A(open val x: String)
class B : A("OK") {
override val x: String = "Fail"
}
fun foo(a: A) = a
fun box(): String {
return if ("${foo(B())}" == "A{x=OK}") "OK" else "fail"
}