building on that: in a non-open class, is there an...
# random
p
building on that: in a non-open class, is there any way that such an extension method can be called from the outside (even if it's public)? e.g. here can Int.foo() be called from anywhere outside Container?
Copy code
class Container {
    fun Int.foo() {
        println(toString()) // calls Int.toString
        println(this@Container.toString())  // calls Container.toString
    }

    fun bar() = 17.foo()
}