David Kubecka
08/16/2024, 7:47 AMclass MyService {
fun Raise<MyError>.someMethod(): Int = 1
}
I have to call the method as with(myService) { someMethod() }
which is quite unintuitive. Will the situation improve with context parameters where I will be able to write
context(_: MyError)
fun someMethod(): Int = 1
?Youssef Shoaib [MOD]
08/16/2024, 7:51 AMmyService.someMethod
provided you have a Raise<MyError>
in the current contextDavid Kubecka
08/16/2024, 7:54 AMcontext(_: Raise<MyError>)
fun someMethod(): Int = 1
Riccardo Cardin
08/16/2024, 9:40 AMDavid Kubecka
08/16/2024, 9:46 AMRiccardo Cardin
08/16/2024, 9:47 AM