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
This commit is contained in:
committed by
Alexander Udalov
parent
d9568ef88c
commit
14c2690447
@@ -0,0 +1,8 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
|
||||
fun foo(g: () -> Int) {}
|
||||
fun foo(f: (Int) -> Int) {}
|
||||
|
||||
fun test() {
|
||||
foo { -> 42 }
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
package
|
||||
|
||||
internal fun foo(/*0*/ g: () -> kotlin.Int): kotlin.Unit
|
||||
internal fun foo(/*0*/ f: (kotlin.Int) -> kotlin.Int): kotlin.Unit
|
||||
internal fun test(): kotlin.Unit
|
||||
Reference in New Issue
Block a user