FIR: Run callable references resolution for synthetic-select calls

This commit is contained in:
Denis Zharkov
2020-02-11 13:16:27 +03:00
parent 003aea2e68
commit 5a2cdfcab4
15 changed files with 82 additions and 45 deletions
@@ -4,33 +4,33 @@
fun testWhen(x: Any?) {
val y = when (x) {
null -> ""
else -> <!UNRESOLVED_REFERENCE!>::unresolved<!>
else -> ::unresolved
}
}
fun testWhenWithBraces(x: Any?) {
val z = when(x) {
null -> { "" }
else -> { <!UNRESOLVED_REFERENCE!>::unresolved<!> }
else -> { ::unresolved }
}
}
fun testIf(x: Any?) {
val y = if (x != null) <!UNRESOLVED_REFERENCE!>::unresolved<!> else null
val y = if (x != null) ::unresolved else null
}
fun testIfWithBraces(x: Any?) {
val z = if (x != null) { <!UNRESOLVED_REFERENCE!>::unresolved<!> } else { null }
val z = if (x != null) { ::unresolved } else { null }
}
fun testElvis(x: Any?) {
val y = x ?: <!UNRESOLVED_REFERENCE!>::unresolved<!>
val y = x ?: ::unresolved
}
fun testExclExcl() {
val y = <!UNRESOLVED_REFERENCE!>:: unresolved<!>!!
val y = :: unresolved!!
}
fun testTry() {
val v = try { <!UNRESOLVED_REFERENCE!>::unresolved<!> } catch (e: Exception) {}
val v = try { ::unresolved } catch (e: Exception) {}
}