[FIR] Don't call componentX for anonymous destructuring entry

This commit is contained in:
Mikhail Glukhikh
2021-01-13 15:00:00 +03:00
parent 795bd26eaf
commit 6cee4e968e
19 changed files with 37 additions and 34 deletions
@@ -8,39 +8,39 @@ fun foo(block: (A) -> Unit) { }
fun bar() {
foo { (_, b) ->
_.hashCode()
<!UNRESOLVED_REFERENCE!>_<!>.<!UNRESOLVED_REFERENCE!>hashCode<!>()
b checkType { _<String>() }
}
foo { (a, _) ->
a checkType { _<Int>() }
_.hashCode()
<!UNRESOLVED_REFERENCE!>_<!>.<!UNRESOLVED_REFERENCE!>hashCode<!>()
}
foo { (_, _) ->
_.hashCode()
<!UNRESOLVED_REFERENCE!>_<!>.<!UNRESOLVED_REFERENCE!>hashCode<!>()
}
foo { (_: Int, b: String) ->
_.hashCode()
<!UNRESOLVED_REFERENCE!>_<!>.<!UNRESOLVED_REFERENCE!>hashCode<!>()
b checkType { _<String>() }
}
foo { (a: Int, _: String) ->
a checkType { _<Int>() }
_.hashCode()
<!UNRESOLVED_REFERENCE!>_<!>.<!UNRESOLVED_REFERENCE!>hashCode<!>()
}
foo { (_: Int, _: String) ->
_.hashCode()
<!UNRESOLVED_REFERENCE!>_<!>.<!UNRESOLVED_REFERENCE!>hashCode<!>()
}
foo { (_, _): A ->
_.hashCode()
<!UNRESOLVED_REFERENCE!>_<!>.<!UNRESOLVED_REFERENCE!>hashCode<!>()
}
foo { (`_`, _) ->
_ checkType { <!INAPPLICABLE_CANDIDATE!>_<!><Int>() }
_ checkType { _<Int>() }
}
foo { (_, `_`) ->
@@ -52,12 +52,12 @@ fun bar() {
}
foo { (_: String, b) ->
_.hashCode()
<!UNRESOLVED_REFERENCE!>_<!>.<!UNRESOLVED_REFERENCE!>hashCode<!>()
b checkType { _<String>() }
}
foo { (_, b): B ->
_.hashCode()
<!UNRESOLVED_REFERENCE!>_<!>.<!UNRESOLVED_REFERENCE!>hashCode<!>()
b checkType { <!INAPPLICABLE_CANDIDATE!>_<!><Short>() }
}
}