[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
@@ -1,15 +1,15 @@
fun testPrefix() {
operator fun Any.not() {}
!todo()
<!UNREACHABLE_CODE!>!<!>todo()
}
fun testPostfixWithCall(n: Nothing) {
operator fun Nothing.inc(): Nothing = this
<!VAL_REASSIGNMENT!>n<!>++
<!VAL_REASSIGNMENT!>n<!><!UNREACHABLE_CODE!>++<!>
}
fun testPostfixSpecial() {
todo()<!UNNECESSARY_NOT_NULL_ASSERTION!>!!<!>
todo()<!UNNECESSARY_NOT_NULL_ASSERTION, UNREACHABLE_CODE!>!!<!>
}
fun todo(): Nothing = throw Exception()