class A { fun foo(a: Int, b: Int): Int { return object: Function0 { override fun invoke(): Int { return a + b - 1 } } } }