https://kotlinlang.org logo
#coroutines
Title
# coroutines
a

Adrien Poupard

07/27/2021, 9:23 AM
As we can do:
Copy code
class Lambda: (String) -> String {
	override fun invoke(p1: String): String {
		TODO("Not yet implemented")
	}
}
Would it be possible to add the feature to do?
Copy code
class SuspendLambda: suspend (String) -> String {
	override suspend fun invoke(p1: String): String {
		TODO("Not yet implemented")
	}
}
m

mateusz.kwiecinski

07/27/2021, 9:27 AM
Related issue: https://youtrack.jetbrains.com/issue/KT-18707 Take a look at the last comment there 🙂
🥳 1
a

Adrien Poupard

07/27/2021, 9:30 AM
Thanks, I will try that
it's working like a charm! @mateusz.kwiecinski Does using
languageVersion = "1.6"
mean that this feature will be released with kotlin 1.6? Will we have a change to have it in the next 1.5.* versions?
e

elizarov

07/29/2021, 9:09 PM
It is a Kotlin 1.6 language feature. Only in preview under a flag in 1.5.*
2 Views