uhe
fun Foo.ext() = FooExt(this) class FooExt(private val zeFoo: Foo) : Foo by zeFoo { fun Int.baz() { toString().bar() } } fun test(foo: Foo) { with(foo.ext()) { 5.baz() } }