Files
kotlin-fork/compiler/testData/codegen/box/callableReference/property/simpleTopLevel.kt
T
2018-07-10 13:34:19 +03:00

12 lines
292 B
Kotlin
Vendored

// IGNORE_BACKEND: JVM_IR
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"
}