Files
kotlin-fork/compiler/testData/codegen/script/scriptInstanceCapturing/classCapturesExtensionIndirect.kts
T
Ilya Chernikov cb5e451e05 Implement script instance capturing in script lowering
for regular classes only. Reimplementing the main behavior of the
old BE and implementing few cases on top of it.
#KT-19423 fixed
2021-12-14 13:39:17 +03:00

21 lines
239 B
Kotlin
Vendored

// IGNORE_BACKEND: JS, JS_IR, JS_IR_ES6, NATIVE, WASM
// IGNORE_BACKEND: JVM
// expected: rv: kotlin.Unit
fun foo() {
B()
}
val b = B()
class A
fun A.ext() = Unit
class B {
fun bar() {
A().ext()
}
}
val rv = foo()