Files
kotlin-fork/compiler/testData/diagnostics/testsWithJvmBackend/scripts/objectCapturesPropertyIndirect.kts
T
Ilya Chernikov 10c5071eda Implement backend error reporting on unsupported script capturing
#KT-30616 fixed
#KT-43995 fixed
#KT-19424 fixed
#KT-49443 fixed
2021-12-14 13:39:17 +03:00

15 lines
191 B
Kotlin
Vendored

// !RENDER_DIAGNOSTICS_FULL_TEXT
// TARGET_BACKEND: JVM_IR
fun foo() = B.bar()
val life = 42
class A {
val x = life
}
<!SCRIPT_CAPTURING_OBJECT!>object B<!> {
fun bar() = A().x
}