Youssef Shoaib [MOD]
05/14/2025, 12:46 PMephemient
05/14/2025, 1:22 PMtailrec suspend
?Youssef Shoaib [MOD]
05/14/2025, 1:28 PM{ foo() }
and ::foo
. The first creates a pointless state machine, the second doesn'tephemient
05/14/2025, 1:30 PMephemient
05/14/2025, 1:31 PMephemient
05/14/2025, 1:34 PMobject : suspend () -> Unit {
override suspend fun invoke() {
foo()
}
}
would do the right thing?Youssef Shoaib [MOD]
05/14/2025, 4:17 PMsuspend fun myFoo() = foo(arg1)
bar(::myFoo)
Which does the right thingephemient
05/14/2025, 5:07 PMbar(suspend fun() = foo(arg1))
would be a workaround but it seems the compiler doesn't work with those either (https://youtrack.jetbrains.com/issue/KT-62021)