[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,11 +1,11 @@
fun testInvoke() {
operator fun Nothing.invoke(): Nothing = this
todo()()
todo()<!UNREACHABLE_CODE!>()<!>
}
fun testInvokeWithLambda() {
operator fun Nothing.invoke(i: Int, f: () -> Int) = f
todo()(1){ 42 }
todo()<!UNREACHABLE_CODE!>(1){ 42 }<!>
}
fun todo(): Nothing = throw Exception()
fun todo(): Nothing = throw Exception()