First compile with the latest alpha: `Caused by: j...
# arrow
d
First compile with the latest alpha:
Caused by: java.lang.IllegalArgumentException: No argument for parameter VALUE_PARAMETER CONTINUATION_CLASS name:$completion index:3 type:kotlin.coroutines.Continuation<kotlin.collections.List<
...
🤯 1
s
Never seen that before, does it give any indication on what piece of code this is occurring on? I have several projects on the
alpha.28
.
d
Yes, and I'm trying to use
context(Raise...)
on it.
(and it has
= coroutineScope {...
in it's definition...)
Maybe that's what's causing it?
s
Try by making it a normal non expression function and let’s see 👀
d
Nope... that's not it.
I removed the
context<Raise<...>>
and replaced it with an either { } block, and then it compiled...
I posted the stacktrace in a DM to @simon.vergauwen
s
Replaced it with an either { } block, and then it compiled...
Yes, that's definitely a bug in the compiler related to context receivers.
Also the reason why I wrote the webinar of last Thursday all without context receivers 😅 😭 😭
d
Oh, so this is a known bug? Is this in all the alphas?
s
This is related to the Kotlin Compiler, not Arrow. Context receivers is still experimental, and not stable.
d
Ah, so I guess that's why I saw you use some regular receivers with Raise...
s
Yes, exactly. In the webinar last week I refrained from using context receivers anywhere, and thus I mixed
Either
and
Raise<E>
in some places to refrain from using them. They seamlessly interop, and you can whatever you want wherever. So when I was working with
Resource<Either<E, A>>
then I used
suspend fun ResourceScope.example(): Either<E, A>
and otherwise I used
Raise<E>
.
I felt that I couldn't suggest or talk too much context receivers since they're not stable for some time.