mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-08 15:53:19 +00:00
11 lines
266 B
Kotlin
Vendored
11 lines
266 B
Kotlin
Vendored
data class Box(val value: String)
|
|
|
|
val foo = Box("lol")
|
|
|
|
fun box(): String {
|
|
val property = ::foo
|
|
if (property.get() != Box("lol")) return "Fail value: ${property.get()}"
|
|
if (property.name != "foo") return "Fail name: ${property.name}"
|
|
return "OK"
|
|
}
|