Kev
03/20/2024, 2:49 AMclass A
class B
interface Foo {
context(A)
fun getSomething(): Unit
}
class FooImpl : Foo {
context(A, B)
override fun getSomething() {
println("Hello, world!")
}
}
fun main() {
with(A()) {
with(B()) {
FooImpl().getSomething()
}
}
}
Kev
03/20/2024, 2:50 AM