Files
kotlin-fork/compiler/testData/codegen/bytecodeListing/contextReceivers/class.kt
T
Alexander Udalov f0fba7be64 K2: add bytecode listing tests
#KT-57171 Fixed
2023-03-14 21:57:26 +01:00

18 lines
220 B
Kotlin
Vendored

// !LANGUAGE: +ContextReceivers
// TARGET_BACKEND: JVM_IR
class Outer {
val x: Int = 1
}
context(Outer)
class Inner(arg: Any) {
fun bar() = x
}
fun f(outer: Outer) {
with(outer) {
Inner(3)
}
}