Scripting: using kotlin type names instead of java ones

avoids problems with K2 resolving of the java types in unexpected
places
This commit is contained in:
Ilya Chernikov
2023-05-19 17:26:39 +02:00
committed by Space Team
parent ae10eebc84
commit 699ef5490b
@@ -29,7 +29,7 @@ class KotlinType private constructor(
* Constructs KotlinType from reflected [kclass]
*/
@JvmOverloads
constructor(kclass: KClass<*>, isNullable: Boolean = false) : this(kclass.java.name, kclass, isNullable)
constructor(kclass: KClass<*>, isNullable: Boolean = false) : this(kclass.qualifiedName ?: error("Cannot use class $kclass as a KotlinType"), kclass, isNullable)
// TODO: implement other approach for non-class types
/**