backend: add tests:
* test for uninitialized vals * test initializers3: global `var` of reference type * expression_as_statement (disabled): using type operator as statement Also enable test break1.
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
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))
|
||||
}
|
||||
Reference in New Issue
Block a user