Files
kotlin-fork/compiler/testData/diagnostics/tests/extensions/contextReceivers/fromKEEP/canvas.kt
T
2021-12-02 20:24:16 +03:00

18 lines
276 B
Kotlin
Vendored

// !LANGUAGE: +ContextReceivers
// FIR_IDENTICAL
interface Canvas
interface Shape {
context(Canvas)
fun draw(): Unit
}
class Circle : Shape {
context(Canvas)
override fun draw() {}
}
object MyCanvas : Canvas
fun test() = with(MyCanvas) { Circle().draw() }