https://kotlinlang.org logo
#strikt
Title
r

robfletcher

05/23/2021, 3:27 PM
This is the issue blocking me on upgrading Strikt to Kotlin 1.5 (I don’t think it will bite you using existing Strikt releases with 1.5 unless you use
Assertion.Builder<Result<*>>
) https://youtrack.jetbrains.com/issue/KT-46890
d

dave08

05/24/2021, 11:40 AM
Did you try forcing boxing it before? If the compiler thinks it HAS to box it, you might always have a Result class instance like you're expecting.
As a rule of thumb, inline classes are boxed whenever they are used as another type.
r

robfletcher

05/24/2021, 2:38 PM
Damn, the example I attached to the issue failed in a scratch file in the Strikt project, but I’m having trouble recreating it in isolation
r

robfletcher

05/24/2021, 2:57 PM
yep
d

dave08

05/24/2021, 2:58 PM
Maybe it's getting boxed for some reason where you're using it?
I know in our project it was failing since 1.4 on IR...
Not just in a scratch file
r

robfletcher

05/24/2021, 5:12 PM
yeah, this is turning out to be a pain to replicate
okay, the receiver on the lambda is the thing that triggers it
d

dave08

05/25/2021, 11:41 AM
Nice! I hope that'll get fixed soon... it seems like even trying to box it doesn't help.
4 Views