[FIR] Support redeclaration diagnostics for different levels of destructured parameters

#KT-59875 #KT-59898
This commit is contained in:
Evgeniy.Zhelenskiy
2023-12-15 21:00:01 +00:00
committed by Space Team
parent 6161f44d91
commit 20f74c22d7
4 changed files with 39 additions and 4 deletions
@@ -11,12 +11,12 @@ fun bar() {
b checkType { <!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>_<!><String>() }
}
foo { (a, b), a ->
foo { (<!REDECLARATION!>a<!>, b), <!REDECLARATION!>a<!> ->
a checkType { _<Int>() }
b checkType { _<String>() }
}
foo { a, (a, b) ->
foo { <!REDECLARATION!>a<!>, (<!REDECLARATION!>a<!>, b) ->
a checkType { <!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>_<!><Int>() }
b checkType { <!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>_<!><String>() }
}