Files
kotlin-fork/js/js.translator/testData/callableReference/property/cases/simpleExtension.kt
T
2014-07-30 17:50:16 +04:00

16 lines
343 B
Kotlin

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