after updating the version of kotlin to 1.7.10 I started getting the error "TypeError: undefined is not an object (evaluating 'tmp$ret$2.$metadata$')" and I can't figure out what is the reason. Has anyone encountered this?
error happens in reflection.kt
Copy code
@JsName("getKClass1")
internal fun <T : Any> getKClass1(jClass: JsClass<T>): KClass<T> {
if (jClass === js("String")) return PrimitiveClasses.stringClass.unsafeCast<KClass<T>>()
val metadata = jClass.asDynamic().`$metadata$` <--- error here
I found that files with the same names "presentation.js" and "domain.js" are created for all modules - because of this, the error occurs. Does anyone know how to make sure that the correct names for files are formed?
Loboda Deni
09/15/2022, 7:01 PM
It turns out that the solution is quite simple - you must manually specify the name of the modules for each gradle module. For some reason it used to work without this on kotlin 1.6.10...