Files
kotlin-fork/compiler/testData/diagnostics/tests/overload/EmptyArgumentListInLambda.kt
T
Svetlana Isakova 14c2690447 Distinguish between no declared arguments and an empty argument list
in a function literal
If there are no arguments, any number of them might be expected
2015-05-26 15:05:03 +03:00

8 lines
122 B
Kotlin
Vendored

// !DIAGNOSTICS: -UNUSED_PARAMETER
fun foo(g: () -> Int) {}
fun foo(f: (Int) -> Int) {}
fun test() {
foo { -> 42 }
}