I think I've found a compiler bug wrt inline classes, could someone confirm that my suspicion is correct?
I'm trying to convert an existing units library that I use to use inline classes rather than boxing every entity. Once I'd completed, some of the tests for this project were failing with ClassCastException errors. I looked into it with a decompiler, and found that in one of the cases where I'd used the inline class, the decompiler shows a cast to Double from Length, and I assume that's what's causing the exception.
https://0x0.st/zj-H.png▾
The source version of that is this:
operator fun contains(p: Translation2d) = p.x in x..(x + w) && p.y in y..(y + h)
where all of the fields in use are Length, the inline class wrapping Double