[Tests] Test samples from KEEP
This commit is contained in:
committed by
TeamCityServer
parent
b0a7be72e8
commit
d8faa9686d
+22
@@ -0,0 +1,22 @@
|
||||
// TARGET_BACKEND: JVM_IR
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
|
||||
interface Canvas {
|
||||
val suffix: String
|
||||
}
|
||||
|
||||
interface Shape {
|
||||
context(Canvas)
|
||||
fun draw(): String
|
||||
}
|
||||
|
||||
class Circle : Shape {
|
||||
context(Canvas)
|
||||
override fun draw() = "OK" + suffix
|
||||
}
|
||||
|
||||
object MyCanvas : Canvas {
|
||||
override val suffix = ""
|
||||
}
|
||||
|
||||
fun box() = with(MyCanvas) { Circle().draw() }
|
||||
Reference in New Issue
Block a user