Trying to get this coroutines. On this code. Why...
# coroutines
m
Trying to get this coroutines. On this code. Why do I have to specify
return@time
? Is it because my suspended coroutine is called time? Also, why can't I do the following:
Copy code
return when(process.exitValue()) {
  0 -> {
         return resultsAdapter.fromJson(scanResults)
...
}
l
Hmm and if you remove
return@time
completely, does it compile?
m
negative! I need to have
return@time
return returns from the nearest enclosing function
non-local returns need to be labeled
m
Nice, thanks @kevinherron