Prohibit having duplicate parameter names in functional types

#KT-15804 Fixed
This commit is contained in:
Dmitry Petrov
2017-05-25 17:08:52 +03:00
parent 9908212c99
commit 2c83718452
6 changed files with 33 additions and 0 deletions
@@ -0,0 +1,7 @@
fun test0(f: (String, String) -> Unit) {
f("", "")
}
fun test1(f: (<!DUPLICATE_PARAMETER_NAME_IN_FUNCTION_TYPE!>a<!>: Int, <!DUPLICATE_PARAMETER_NAME_IN_FUNCTION_TYPE!>a<!>: Int) -> Unit) {
f(1, 1)
}
@@ -0,0 +1,4 @@
package
public fun test0(/*0*/ f: (kotlin.String, kotlin.String) -> kotlin.Unit): kotlin.Unit
public fun test1(/*0*/ f: (a: kotlin.Int, a: kotlin.Int) -> kotlin.Unit): kotlin.Unit