Files
kotlin-fork/compiler/testData/codegen/script/scriptInstanceCapturing/classCapturesFunction.kts
T
Ilya Chernikov 02e2438d37 K2 Scripting: fix script this receiver handling in IR
also fix accessor lowering
2023-07-05 19:46:04 +00:00

15 lines
170 B
Kotlin
Vendored

// IGNORE_BACKEND: JS, JS_IR, JS_IR_ES6, NATIVE, WASM
// expected: rv: 42
val x = 6
val y = 7
fun foo() = x
class A {
fun bar() = foo() * y
}
val rv = A().bar()