So in Java you'd call it like
new AsyncTask<Void, Void, Int>() { }.execute()
How would you do this in Kotlin as I can't seem to get it working? The compiler just tells me that I can't instantiate an abstract class when I attempt this in Kotlin
var a = AsyncTask<Void, Void, Int> {}.execute()
I'm still learning Android in general so some guidance here wouldn't go a miss, thanks.
//EDIT//
This appears to have worked but the compiler has concerns about memory leakage:
var a = object: AsyncTask<Void, Void, Int>() {
override fun doInBackground(vararg p0: Void?): Int {
TODO("Not yet implemented")
}
}.execute()