https://kotlinlang.org logo
#arrow
Title
# arrow
d

dave08

02/20/2023, 4:19 PM
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

simon.vergauwen

02/20/2023, 4:20 PM
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

dave08

02/20/2023, 4:21 PM
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

Stylianos Gakis

02/20/2023, 4:23 PM
Try by making it a normal non expression function and let’s see 👀
d

dave08

02/20/2023, 4:24 PM
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

simon.vergauwen

02/20/2023, 5:33 PM
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

dave08

02/20/2023, 6:21 PM
Oh, so this is a known bug? Is this in all the alphas?
s

simon.vergauwen

02/20/2023, 6:21 PM
This is related to the Kotlin Compiler, not Arrow. Context receivers is still experimental, and not stable.
d

dave08

02/20/2023, 6:23 PM
Ah, so I guess that's why I saw you use some regular receivers with Raise...
s

simon.vergauwen

02/20/2023, 6:24 PM
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.
6 Views