also, does anybody else things its strange that `s...
# coroutines
g
also, does anybody else things its strange that
select {}
will simply abandon your coroutine?
Copy code
@Test fun `using an empty select clause just abandons you`() = runBlocking {

        val producer = produce<String> {
            select<String> {
                val x = 4;
            }

            val y = 4;
        }

        val result = producer.receiveOrNull()

        val z = 4;
    }
never completes
e
select {}
(without clauses) will never resume. Just like
suspendCoroutine {}
. Conceptually, just like
while (true) {}
.
We should have some kind of inspection or runtime exception, though
👍 1
g
can you not set a flag in the
registerSelectClause
implementations, then throw an exception if that flag is not set?
also, I've got a
java.lang.ClassCastException: ...ProducerCoroutine cannot be cast to ...SelectClause1
from a fairly innocuous code, i just reduced it a little, should I submit this to kotlinx.coroutines or youtrack/KT?
e
Please, file a bug to GitHub
🐿️ 1