Valhalla inline classes - created in Java, used in Kotlin

Hello everyone! I understand that I can’t create inline class with more than one field in Kotlin (yet). But can I use inline classes created in Java? I’ve tried and got this:

java.lang.IllegalStateException: Could not read class: VirtualFile: <My inline java class>.class

Tried -XXLanguage:+InlineClasses, -jdk-home points to JDK with Valhalla support, -jvm-target 14.

If what I’m trying to do is possible - what else I need to do to make kotlinc understand compiled Java inline classes?

Kotlin doesn’t support valhalla inline classes. Right now kotlin inline classes and valhalla inline classes are 2 completly different things. In the future kotlin will combine both concepts into so called value classes. However this is still in the desing phase and I doubt there will be much work on supporting valhalla before we get a release date for it.
If you want more information you should read through this KEEP:

Oh :frowning:

I guess I have no choice but writing a precompiler that substitutes “fallback” non-valhalla classes when needed.