Followup to that "NO" reply for inline classes. Is...
# getting-started
j
Followup to that "NO" reply for inline classes. Is there java interop?
j
You will java interop for things that use the unboxed inner value at least (like a function taking your inline value class as argument). But I'm not sure for when it is boxed (like when it take a list of your class).
j
the param argument is good enough. Thanks!
j
In this case it will be compiled as the unboxed value as far as java is concerned, so you can pass the inner value directly from Java.
j
thats good. I ran into another issue with the @JvmOverloads annotation which made me worried
s
Check out the section "Changing JVM name for Java Calls" on how to do Java interop with Inline classes: https://blog.jetbrains.com/kotlin/2021/02/new-language-features-preview-in-kotlin-1-4-30/ and/or the "mangling function names" section of this video on Inline Classes (starting at 7:57)

https://www.youtube.com/watch?v=LpqvtgibbsQ&t=477s

👍 1