Mark
09/07/2023, 7:51 AMbuildString is used but the StringBuilder receiver is never accessed. Same for buildList , buildSet etc. My motivation for this is that after some refactoring, I made this mistake:
buildString {
items.joinToString(separator = " ") {
foo(it)
}
}Klitos Kyriacou
09/07/2023, 10:10 AMthis receiver is not used in a lambda? That would include scope functions such as apply, with and run.
Maybe this is the wrong channel as it's about compiler behaviour.Mark
09/07/2023, 2:00 PMJeff Lockhart
09/07/2023, 5:58 PM@CheckReceiver annotation for functions/lambdas makes sense?Klitos Kyriacou
09/08/2023, 8:20 AMit and there's no need to check it, but I can't think of any ignorable cases at the moment for a this receiver.CLOVIS
09/08/2023, 12:38 PMrunBlocking {
delay(5000)
println("Done")
}
It's reasonable to write this code, and I'm never using the CoroutineScope receiver.Klitos Kyriacou
09/08/2023, 2:02 PM