// FIX: Remove receiver & wrap with 'coroutineScope { ... }' | |
import kotlinx.coroutines.async | |
import kotlinx.coroutines.coroutineScope | |
fun calcSomething() {} | |
suspend fun foo() { | |
coroutineScope { | |
async { | |
calcSomething() | |
calcSomething() // ... | |
/* ... */ | |
calcSomething() /* ... */ | |
calcSomething() | |
if (true) // ... | |
calcSomething() | |
} | |
} | |
} |