abstract class A { fun print() = "OK" } fun f() = test("") private fun test(t: T) = object : A() {} fun box() = f().print()