02b40326cc
If all the suspension calls in a suspend function were "hidden" under the for-convention (iterator/next/hasNext) calls, control-flow didn't find them, thus supposing that there is no suspension points and there is no need to generate a coroutine state machine The solution is to add relevant calls to CFG #KT-15824 Fixed
26 lines
865 B
Plaintext
Vendored
26 lines
865 B
Plaintext
Vendored
== foo ==
|
|
fun foo(c: Collection<Int>) {
|
|
for (e in c) {
|
|
{
|
|
break
|
|
}
|
|
}
|
|
}
|
|
---------------------
|
|
<v0>: {<: Collection<Int>} NEW: magic[FAKE_INITIALIZER](c: Collection<Int>) -> <v0>
|
|
<v5>: Int NEW: magic[LOOP_RANGE_ITERATION](c|<v4>) -> <v5>
|
|
c <v4>: {<: Iterable<Int>} NEW: call(c, next) -> <v4>
|
|
{ break } <v6>: * NEW: r({ break }) -> <v6>
|
|
{ { break } } <v6>: * COPY
|
|
for (e in c) { { break } } !<v7>: *
|
|
{ for (e in c) { { break } } } !<v7>: * COPY
|
|
=====================
|
|
== anonymous_0 ==
|
|
{
|
|
break
|
|
}
|
|
---------------------
|
|
break !<v0>: *
|
|
break !<v0>: * COPY
|
|
=====================
|