Files
kotlin-fork/compiler/testData/diagnostics/tests/controlFlowAnalysis/deadCode/deadCodeFromDifferentSources.fir.kt
T
Andrey Zinovyev ec4cbfef59 [FIR] UNREACHABLE_CODE diagnostic (wip)
Implementation for PSI only
2021-08-04 14:42:24 +03:00

23 lines
342 B
Kotlin
Vendored

package c
fun test1() {
<!UNREACHABLE_CODE!>val <!UNUSED_VARIABLE!>r<!>: Nothing =<!> null!!
}
fun test2(a: A) {
a + a
<!UNREACHABLE_CODE!>bar()<!>
}
fun test3() {
null!!
<!UNREACHABLE_CODE!>bar()<!>
}
fun throwNPE(): Nothing = null!!
class A {
operator fun plus(a: A): Nothing = throw Exception()
}
fun bar() {}