y
03/23/2023, 4:14 PMclass Foo(val s: String)
interface MyInterface {
    fun Foo.bar(): String
}
object MyImpl : MyInterface {
    override fun Foo.bar(): String = this.s
}val myImpl = MyImplFoobar()Paul Griffith
03/23/2023, 4:20 PMwith(MyImpl) {
  someFooInstance.bar()
}y
03/23/2023, 4:25 PMwhenMyImply
03/23/2023, 4:28 PMPaul Griffith
03/23/2023, 4:29 PMMyInterface/MyImplFoo.bar