62737efd54
* test for uninitialized vals * test initializers3: global `var` of reference type * expression_as_statement (disabled): using type operator as statement Also enable test break1.
17 lines
233 B
Kotlin
17 lines
233 B
Kotlin
fun foo(b: Boolean): Int {
|
|
val x: Int
|
|
if (b) {
|
|
x = 1
|
|
} else {
|
|
x = 2
|
|
}
|
|
|
|
return x
|
|
}
|
|
|
|
fun main(args: Array<String>) {
|
|
val uninitializedUnused: Int
|
|
|
|
println(foo(true))
|
|
println(foo(false))
|
|
} |