Files
kotlin-fork/compiler/testData/codegen/box/callableReference/bound/kt15446.kt
T
2020-11-09 16:04:43 +03:00

17 lines
333 B
Kotlin
Vendored

// DONT_TARGET_EXACT_BACKEND: WASM
// WASM_MUTE_REASON: BINDING_RECEIVERS
// KJS_WITH_FULL_RUNTIME
//WITH_RUNTIME
fun box(): String {
val a = intArrayOf(1, 2)
val b = arrayOf("OK")
if ((a::component2)() != 2) {
return "fail"
}
if ((a::get)(1) != 2) {
return "fail"
}
return (b::get)(0)
}