Files
kotlin-fork/compiler/testData/diagnostics/tests/controlFlowAnalysis/deadCode/deadCodeInUnaryExpr.fir.kt
T
2021-06-21 20:58:01 +03:00

16 lines
303 B
Kotlin
Vendored

fun testPrefix() {
operator fun Any.not() {}
!todo()
}
fun testPostfixWithCall(n: Nothing) {
operator fun Nothing.inc(): Nothing = this
<!VAL_REASSIGNMENT!>n<!>++
}
fun testPostfixSpecial() {
todo()<!UNNECESSARY_NOT_NULL_ASSERTION!>!!<!>
}
fun todo(): Nothing = throw Exception()