elizarov
12/24/2016, 3:58 PMasyncGenerate
(its initial continuation is not reentrant properly). Produces stack overflow (correct behavior -- should just wait):
class X {
fun s(): AsyncIterator<Int> = asyncGenerate<Int> { t().next() }.iterator()
fun t(): AsyncIterator<Int> = asyncGenerate<Int> { s().next() }.iterator()
}
fun main(args: Array<String>) {
async { X().s().next() }.get()
}