Files
kotlin-fork/compiler/testData/codegen/box/callableReference/function/overloadedFunVsVal.kt
T
Ilya Chernikov 78ca733c38 FIR JS: add K2 variants of all other JS tests
except tests that are not possible to add without some modifications in
the test infra. See todos on the commented-out test declarations
2022-11-12 16:28:24 +01:00

26 lines
473 B
Kotlin
Vendored

// IGNORE_BACKEND: WASM
// WASM_MUTE_REASON: IGNORED_IN_JS
// IGNORE_BACKEND_K1: JS_IR
// IGNORE_BACKEND: JS_IR_ES6
// TODO: muted automatically, investigate should it be ran for JS or not
// IGNORE_BACKEND: JS
import kotlin.reflect.*
class A {
val x = 1
fun x(): String = "OK"
}
val f1: KProperty1<A, Int> = A::x
val f2: (A) -> String = A::x
fun box(): String {
val a = A()
val x1 = f1.get(a)
if (x1 != 1) return "Fail 1: $x1"
return f2(a)
}