[FIR] Fix resolving of single underscore _
Now compiler throws `UNRESOLVED_REFERENCE` here:
```
val boo = { _: Exception -> `_`.stackTrace }
```
This commit is contained in:
+7
-7
@@ -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 { _, `_` ->
|
||||
|
||||
Reference in New Issue
Block a user