[FIR] Throw REDECLARATION for duplicated value parameters in function

Add new test file
This commit is contained in:
Ivan Kochurkin
2021-07-24 17:50:11 +03:00
committed by Space
parent fd92b851a2
commit 9736cc162b
12 changed files with 379 additions and 34 deletions
@@ -0,0 +1,7 @@
fun test(<!REDECLARATION!>a<!>: Int, <!REDECLARATION!>a<!>: String) {}
fun test2(block: (Int, String) -> Unit) { }
fun main() {
test2 { <!REDECLARATION!>b<!>, <!REDECLARATION!>b<!> -> ; }
}
@@ -0,0 +1,7 @@
fun test(<!REDECLARATION, REDECLARATION!>a<!>: Int, <!REDECLARATION, REDECLARATION!>a<!>: String) {}
fun test2(block: (Int, String) -> Unit) { }
fun main() {
test2 { <!REDECLARATION, REDECLARATION!>b<!>, <!REDECLARATION, REDECLARATION!>b<!> -> ; }
}
@@ -0,0 +1,5 @@
package
public fun main(): kotlin.Unit
public fun test(/*0*/ a: kotlin.Int, /*1*/ a: kotlin.String): kotlin.Unit
public fun test2(/*0*/ block: (kotlin.Int, kotlin.String) -> kotlin.Unit): kotlin.Unit