class X { val length = 2 } fun X.foo() { this.length length this() fun ~X.bar() { this.length length this() this@foo.length this@bar.length } } operator fun X.invoke() {} public inline fun T.run(block: T.() -> R): R = block()