However, when I use KClass.qualifiedName in the JavaScript module of a multi-platform project, both IDEA and the Kotlin compiler complain that it is not supported by JavaScript yet:
This is strange for me too. The documentation says that near the full reflection api is supported on jvm and js, but the ide and the compiler thinks it differently. Is there something missing?
My understanding is that qualifiedName is not supported on Kotlin JS; not even on the latest 1.3.41. I have posted the question on slack and no one answered me why this is still so. I desperately need the support for qualifiedName on JS. If you look at the JS code generated, you will see the class information is generated with a data structure called $metadata$ associated with each Kotlin class, and there is only simpleName included, no qualifiedName. I don’t know what makes it so difficult for the compiler to also generate and include the qualifiedName there.
I’m interested in full reflection api support too. But seem API reference have a lot of members marked as supported in JS, but in fact they are not. It’s confusing me too. This page better describes what supports reflection: JavaScript Reflection.