// "Create member function 'A.foo'" "true" class A(val n: T) { fun foo(function: (T) -> T): A { TODO("Not yet implemented") } } fun test() { val a: A = A(1).foo { p: Int -> p + 1 } }