soywiz-archive/klock

Strange casting of DateTime in runtime

Closed this issue · 3 comments

Hello,

I am using library klock in my projects and after update up to 2.1.0 version (with updating of kotlin up to 1.5.0) I have faced with next issue: com.soywiz.klock.DateTime cannot be cast to java.lang.Number. In case it is known issue, could you please help me to solve this problem? Otherwise, I would be glad to help you find the solution, but I afraid that it is related to some changes in Kotlin 1.5.0 and must be resolved on you side with something like annotation @JvmInline

Would that work for all the users? IE Java 8, etc.

According to https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.jvm/-jvm-inline/ :

Adding and removing the annotation is binary incompatible change, since inline classes' methods and functions with inline classes in their signature are mangled.

By default all inline classes are supposed to have no any signature under the hood

I guess this was fixed already