private class A { fun foooo() { { bar }() } companion object { const val bar = 4 } } private fun test(a: A) { a.foooo() }