Generate reference to existing class for builtin function references
Instead of non-existing `kotlin.KotlinPackage`, which led to NoClassDefFoundError as soon as reflection tried to call getOwner on a builtin callable reference, use a reference to a new physical class `kotlin.jvm.internal.Intrinsics$Kotlin`. This will allow to support KT-17151. Note that for API version less than 1.4, this will still lead to NoClassDefFoundError, but this is not worse than the current situation where it happens anyway.
This commit is contained in:
@@ -1313,7 +1313,7 @@ class KotlinTypeMapper @JvmOverloads constructor(
|
||||
return JvmClassName.byClassId(ownerClassId).internalName
|
||||
}
|
||||
|
||||
private val FAKE_CLASS_ID_FOR_BUILTINS = ClassId.topLevel(FqName("kotlin.KotlinPackage"))
|
||||
private val FAKE_CLASS_ID_FOR_BUILTINS = ClassId(FqName("kotlin.jvm.internal"), FqName("Intrinsics.Kotlin"), false)
|
||||
|
||||
private fun getPackageMemberContainingClassesInfo(descriptor: DescriptorWithContainerSource): ContainingClassesInfo? {
|
||||
val containingDeclaration = descriptor.containingDeclaration
|
||||
|
||||
Reference in New Issue
Block a user