19 lines
272 B
Kotlin
Vendored
19 lines
272 B
Kotlin
Vendored
// !LANGUAGE: +ContextReceivers
|
|
// TARGET_BACKEND: JVM_IR
|
|
// IGNORE_BACKEND_FIR: JVM_IR
|
|
// IGNORE_BACKEND: JVM
|
|
|
|
class Outer {
|
|
val x: Int = 1
|
|
}
|
|
|
|
context(Outer)
|
|
class Inner(arg: Any) {
|
|
fun bar() = x
|
|
}
|
|
|
|
fun f(outer: Outer) {
|
|
with(outer) {
|
|
Inner(3)
|
|
}
|
|
} |