//For testing error messages text see DiagnosticMessageTest.testFunctionPlaceholder package a class A fun foo(a: A) = a fun bar(f: (T) -> R) = f fun test() { foo { it } foo { x -> x} foo { (x: Int) -> x} bar { it + 1 } bar { x -> x + 1} bar { (x: Int) -> x + 1} }