Dead code elimination
#KT-6602 Fixed #KT-6305 Fixed #KT-5656 Fixed
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
import kotlin.test.assertEquals
|
||||
|
||||
fun foo(): Int {
|
||||
return 1
|
||||
// val xyz has empty live range because everything after return will be removed as dead
|
||||
val xyz = 1
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
assertEquals(1, foo())
|
||||
return "OK"
|
||||
}
|
||||
Reference in New Issue
Block a user