GarouDan
03/30/2019, 10:50 AMin myfun getPackage(class_: KClass<*>): String? = class_.qualifiedName?.replace(".${class_.simpleName}", "")
common
module of a multiplatform
project.
The problem is the .qualifiedName
part doesn’t work in JavaScript and because of that I’m receiving the following error:
Unsupported [This reflection API is not supported yet in JavaScript]
It would be very nice to see JavaScript supporting the full reflection API, but, either way, the problem is a bit different.
My code is not compiling in the JavaScript module because of that.
But all of my targets other than the js could benefit from that, so, how could I avoid this error in order to make this code work for native and jvm targets and let js without that?
Where the code could live inside the common
module?ian.shaun.thomas
03/30/2019, 11:44 AMDico
03/30/2019, 6:08 PMexpect val KClass<*>.qualifiedName: String
?ian.shaun.thomas
03/30/2019, 6:11 PMGarouDan
04/01/2019, 11:12 AMDico
04/01/2019, 1:52 PM