import kotlin.reflect.* import kotlin.reflect.jvm.* class K(private val value: String) fun box(): String { val p = javaClass().kotlin.properties.single() as KMemberProperty try { return p.get(K("Fail: private property should not be accessible by default")) } catch (e: IllegalPropertyAccessException) { // OK } p.accessible = true return p.get(K("OK")) }