[FIR] Fix resolving of single underscore _

Now compiler throws `UNRESOLVED_REFERENCE` here:

```
val boo = { _: Exception -> `_`.stackTrace }
```
This commit is contained in:
Ivan Kochurkin
2021-07-23 18:18:13 +03:00
committed by Space
parent 8bfaa39a5c
commit 1a40164ef0
14 changed files with 87 additions and 44 deletions
@@ -5,35 +5,35 @@ fun foobar(block: (Double) -> Unit) { }
fun bar() {
foo { _, b ->
_.hashCode()
<!UNRESOLVED_REFERENCE!>_<!>.hashCode()
b checkType { _<String>() }
}
foo { a, _ ->
a checkType { _<Int>() }
_.hashCode()
<!UNRESOLVED_REFERENCE!>_<!>.hashCode()
}
foo { _, _ ->
_.hashCode()
<!UNRESOLVED_REFERENCE!>_<!>.hashCode()
}
foo { _: Int, b: String ->
_.hashCode()
<!UNRESOLVED_REFERENCE!>_<!>.hashCode()
b checkType { _<String>() }
}
foo { a: Int, _: String ->
a checkType { _<Int>() }
_.hashCode()
<!UNRESOLVED_REFERENCE!>_<!>.hashCode()
}
foo { _: Int, _: String ->
_.hashCode()
<!UNRESOLVED_REFERENCE!>_<!>.hashCode()
}
foo { `_`, _ ->
_ checkType { <!INAPPLICABLE_CANDIDATE!>_<!><Int>() }
_ checkType { _<Int>() }
}
foo { _, `_` ->