Files
kotlin-fork/js/js.translator/testData/box/callableReference/property/simpleTopLevel.kt
T
2018-04-19 13:17:28 +03:00

16 lines
427 B
Kotlin
Vendored

// IGNORE_BACKEND: JS_IR
// EXPECTED_REACHABLE_NODES: 1121
// This test was adapted from compiler/testData/codegen/box/callableReference/property/.
package foo
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"
}