Files
kotlin-fork/js/js.translator/testData/box/native/passExtLambdaToNative.kt
T
Svyatoslav Kuzmich a3e2d2804c [Wasm] Update testData after adding K2 and new test infra support.
- Actualize muted K2 tests
- Actualize muted K1 tests with module systems because legacy Wasm test
  infra had no respect for "// MODULE: ..." test directives
2023-06-25 10:20:40 +02:00

23 lines
515 B
Kotlin
Vendored

// IGNORE_BACKEND_K1: JS_IR
// IGNORE_BACKEND_K2: JS_IR
// IGNORE_BACKEND: JS_IR_ES6
// TODO: Unmute when extension functions are supported in external declarations.
// IGNORE_BACKEND: JS
// IGNORE_BACKEND_K1: WASM
package foo
external class A(v: String) {
val v: String
}
external fun bar(a: A, extLambda: A.(Int, String) -> String): String = definedExternally
fun box(): String {
val a = A("test")
val r = bar(a) { i, s -> "${this.v} $i $s"}
if (r != "test 4 boo") return r
return "OK"
}