[FIR] Support of REDECLARATION for local val/var, ^KT-54405 Fixed

This commit is contained in:
Ivan Kochurkin
2022-12-01 15:08:34 +01:00
committed by Space Team
parent 879deb90fc
commit e49bb1fe37
30 changed files with 201 additions and 85 deletions
@@ -8,7 +8,7 @@ class C {
}
fun test() {
for ((x, x) in C()) {
for ((<!REDECLARATION!>x<!>, <!REDECLARATION!>x<!>) in C()) {
}
}
@@ -36,11 +36,11 @@ fun test() {
foo(x, <!UNDERSCORE_USAGE_WITHOUT_BACKTICKS, UNRESOLVED_REFERENCE!>_<!>)
foo(<!UNDERSCORE_USAGE_WITHOUT_BACKTICKS, UNRESOLVED_REFERENCE!>_<!>, y)
val (`_`, z) = A()
val (<!REDECLARATION!>`_`<!>, z) = A()
foo(<!UNDERSCORE_USAGE_WITHOUT_BACKTICKS!>_<!>, z)
val (_, `_`) = A()
val (_, <!REDECLARATION!>`_`<!>) = A()
foo(<!ARGUMENT_TYPE_MISMATCH, UNDERSCORE_USAGE_WITHOUT_BACKTICKS!>_<!>, y)