class A() { class B(val i: Int) { } fun test() = Array (10, { B(it) }) } fun box() = if(A().test()[5].i == 5) "OK" else "fail"