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

18 lines
400 B
Kotlin
Vendored

// IGNORE_BACKEND: JS_IR
// EXPECTED_REACHABLE_NODES: 1113
// This test was adapted from compiler/testData/codegen/box/callableReference/property/.
package foo
val String.id: String
get() = this
fun box(): String {
val pr = String::id
if (pr.get("123") != "123") return "Fail value: ${pr.get("123")}"
if (pr.name != "id") return "Fail name: ${pr.name}"
return pr.get("OK")
}