Norbi
06/04/2024, 5:09 PMinterface A
interface B
fun f1(block: A.() -> Unit) { TODO() }
fun f2(block: context(B) () -> Unit) { TODO() }
fun f( block: context(B) A.() -> Unit) {
f1 {
f2 {
block(
this@f2, // How?
this@f1
)
}
}
}
(It works if I change f2()
to fun f2(block: B.() -> Unit)
, my question is about the above example.)Youssef Shoaib [MOD]
06/04/2024, 5:25 PMcontext(A) fun <A> given(): A = this@A