efemoney
04/23/2024, 10:21 AMRestrictsSuspension
? I have my own additional dsl on top of sequence building but I cannot call through to the underlying sequence builder from my DSL because of restricts suspension 😞Youssef Shoaib [MOD]
04/23/2024, 10:26 AMefemoney
04/23/2024, 10:33 AMYoussef Shoaib [MOD]
04/23/2024, 10:39 AMefemoney
04/23/2024, 10:41 AM@RestrictsSuspension
protected sealed interface ProduceOptionsScope {
suspend fun <T> yield(option: Option<T>): Option<T>
fun <T> value(block: () -> T): Value<T> = ValueImpl(block)
fun <T> noValue(): Value<Nothing> = ValueImpl { error("No value provided") }
}
protected sealed interface Value<T>
efemoney
04/23/2024, 11:16 AM@Suppress("ILLEGAL_RESTRICTED_SUSPENDING_FUNCTION_CALL")
(its in the printed error message)Youssef Shoaib [MOD]
04/23/2024, 11:33 AMefemoney
04/23/2024, 12:48 PM