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
This commit is contained in:
committed by
TeamCityServer
parent
87952d63a3
commit
cb5e451e05
Vendored
+18
@@ -0,0 +1,18 @@
|
||||
// IGNORE_BACKEND: JS, JS_IR, JS_IR_ES6, NATIVE, WASM
|
||||
// IGNORE_BACKEND: JVM
|
||||
|
||||
// expected: rv: 42
|
||||
|
||||
fun foo() = B().bar()
|
||||
|
||||
val life = 42
|
||||
|
||||
class A {
|
||||
val x = "$life"
|
||||
}
|
||||
|
||||
class B {
|
||||
fun bar() = A().x
|
||||
}
|
||||
|
||||
val rv = foo()
|
||||
Reference in New Issue
Block a user