I have a code like this: <https://pl.kotl.in/5vZUg...
# announcements
k
I have a code like this: https://pl.kotl.in/5vZUgXStV I expect that it will print
true
. However,
ClassCastException: java.lang.Long cannot be cast to DogId
is thrown. Is it a bug in kotlin? Or maybe I’m using inline classes incorrectly?
j
Unless you really need it, just use a data class and trust the compiler to optimise it out. You can always come back to it if your benchmarks show it is on the hotpath
1
👍 1