The following code doesn't compile, although the documentation says it should be as simple as this:
override fun onResume() {
super.onResume()
async {
Log.d("foo", "async")
}
}
The error is:
...kt: (31, 9): None of the following functions can be called with the arguments supplied:
@Deprecated public fun <T> async(context: CoroutineContext, start: Boolean, block: suspend CoroutineScope.() -> ???): Deferred<???> defined in kotlinx.coroutines.experimental
public fun <T> async(context: CoroutineContext, start: CoroutineStart = ..., block: suspend CoroutineScope.() -> ???): Deferred<???> defined in kotlinx.coroutines.experimental