but then you might expect this to work, but it doe...
# announcements
k
but then you might expect this to work, but it doesn't:
Copy code
open class Foo

val myFoo = object : Foo() {
  val x = 10
}

fun test() {
  println(myFoo.x)
}