open class K fun foo(n: Int) { val x = K1(n) } class K1(private val n: Int) : K() { fun bar() = n }