Files
kotlin-fork/compiler/testData/ir/irText/declarations/contextReceivers/fromKEEP/canvas.kt.txt
T
2023-03-23 16:23:09 +00:00

44 lines
748 B
Kotlin
Vendored

interface Canvas {
abstract val suffix: String
abstract get
}
interface Shape {
abstract fun draw($context_receiver_0: Canvas): String
}
class Circle : Shape {
constructor() /* primary */ {
super/*Any*/()
/* <init>() */
}
override fun draw($context_receiver_0: Canvas): String {
return "OK".plus(other = $context_receiver_0.<get-suffix>())
}
}
object MyCanvas : Canvas {
private constructor() /* primary */ {
super/*Any*/()
/* <init>() */
}
override val suffix: String
field = ""
override get
}
fun box(): String {
return with<MyCanvas, String>(receiver = MyCanvas, block = local fun MyCanvas.<anonymous>(): String {
return Circle().draw($context_receiver_0 = $this$with)
}
)
}