mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-08 15:53:19 +00:00
See testData/simpleUnitializedMerge.kt On exit from `if` we merge value in variable with slot 1 (x): - from `if` body we get BoxedBasicValue - from outer block we get UNITIALIZED_VALUE So we just suppose `x` is unitialized after `if` and there's no need to mark BoxedValue as unsafe to remove because it's anyway can't be used after `if` #KT-6842 Fixed
11 lines
159 B
Kotlin
Vendored
11 lines
159 B
Kotlin
Vendored
fun box(): String {
|
|
var result = 0
|
|
if (1 == 1) {
|
|
val x: Int? = 1
|
|
result += x!!
|
|
}
|
|
return "OK"
|
|
}
|
|
|
|
// 0 java/lang/Integer.valueOf
|