```import arrow.core.raise.ExperimentalTraceApi im...
# arrow
ł
Copy code
import arrow.core.raise.ExperimentalTraceApi
import arrow.core.raise.Trace
import arrow.core.raise.either
import arrow.core.raise.traced

@OptIn(ExperimentalTraceApi::class)
fun main() {
    either {
        traced({
            raise("error")
        }, {
                a: Trace, _: String ->
            a.printStackTrace()
        })
    }
}
Exception in thread "main" java.lang.IllegalAccessError: failed to access class arrow.core.raise.RaiseCancellationException from class MainKt (arrow.core.raise.RaiseCancellationException and MainKt are in unnamed module of loader 'app') at MainKt.main(Main.kt:10) at MainKt.main(Main.kt) Process finished with exit code 1
s
Hey @Łukasz Gendek, That's strange. 🤔 Can you share your gradle file, so I can try reproducing this locally?
ł
here you go
Hey. I just want to ask, if you were able to reproduce this?
s
Hey @Łukasz Gendek, Yes, I am able to reproduce this. First moment I had free to check this, thanks for you reminder. That is definitely a bug.. I think it's a combination of
inline
and
private
, which shouldn't have been allowed but somehow the compiler didn't complain 🤔
Thanks for sharing the Gradle config, made it easy to reproduce. Silly thing is we cannot write a test for this in Arrow since it requires being called from a different compilation unit 🙃
ł
It is interesting that this works when moving the code to the arrow.core.raise package.
So I have a workound.
But still I can't wait till it gets fixed and I would not need the workaround :)