Files
kotlin-fork/compiler/testData/cfg-variables/bugs/varInitializationInIfInCycle.values
T
Svetlana Isakova aa26db0538 Updated tests for control flow: call instruction stores call element
instead of callee expression
2014-07-08 14:57:38 +04:00

32 lines
1.1 KiB
Plaintext

== foo ==
fun foo(numbers: Collection<Int>) {
for (i in numbers) {
val b: Boolean
if (1 < 2) {
b = false
}
else {
b = true
}
use(b)
continue
}
}
---------------------
<v0>: {<: Collection<Int>} NEW: magic(numbers: Collection<Int>) -> <v0>
<v2>: Int NEW: magic(numbers|<v1>) -> <v2>
numbers <v1>: {<: Iterable<Int>} NEW: r(numbers) -> <v1>
1 <v3>: {<: Comparable<Int>} NEW: r(1) -> <v3>
2 <v4>: Int NEW: r(2) -> <v4>
1 < 2 <v5>: Boolean NEW: call(1 < 2, compareTo|<v3>, <v4>) -> <v5>
false <v6>: Boolean NEW: r(false) -> <v6>
true <v7>: Boolean NEW: r(true) -> <v7>
b <v8>: {<: Any?} NEW: r(b) -> <v8>
use(b) <v9>: * NEW: call(use(b), use|<v8>) -> <v9>
=====================
== use ==
fun use(vararg a: Any?) = a
---------------------
<v0>: {<: Array<Any?>} NEW: magic(vararg a: Any?) -> <v0>
a <v1>: {<: Array<Any?>} NEW: r(a) -> <v1>
=====================