[FIR] UNREACHABLE_CODE diagnostic (wip)

Implementation for PSI only
This commit is contained in:
Andrey Zinovyev
2021-07-29 12:39:47 +03:00
committed by TeamCityServer
parent dcd61c292d
commit ec4cbfef59
47 changed files with 348 additions and 220 deletions
@@ -3,11 +3,11 @@
fun testArgumentInCall() {
fun bar(i: Int, s: String, x: Any) {}
bar(1, todo(), "")
<!UNREACHABLE_CODE!>bar(<!>1, todo(), <!UNREACHABLE_CODE!>"")<!>
}
fun testArgumentInVariableAsFunctionCall(f: (Any) -> Unit) {
f(todo())
<!UNREACHABLE_CODE!>f(<!>todo()<!UNREACHABLE_CODE!>)<!>
}
fun todo(): Nothing = throw Exception()
fun todo(): Nothing = throw Exception()