Minor, improve exception message for reflection on built-ins

This commit is contained in:
Alexander Udalov
2015-09-14 13:38:31 +03:00
parent b4470de713
commit b1d9e5c961
2 changed files with 3 additions and 2 deletions
@@ -27,7 +27,7 @@ import java.lang.reflect.Type
import java.util.*
public abstract class ReflectJavaMember : ReflectJavaElement(), ReflectJavaAnnotationOwner, ReflectJavaModifierListOwner, JavaMember {
internal abstract val member: Member
public abstract val member: Member
override val element: AnnotatedElement get() = member as AnnotatedElement
@@ -131,7 +131,8 @@ internal object RuntimeTypeMapper {
}
// If it's a deserialized function but has no JVM signature, it must be from built-ins
return mapIntrinsicFunctionSignature(function) ?:
throw KotlinReflectionInternalError("No metadata found for $function")
throw KotlinReflectionInternalError("Reflection on built-in Kotlin types is not yet fully supported. " +
"No metadata found for $function")
}
is JavaMethodDescriptor -> {
val method = ((function.source as? JavaSourceElement)?.javaElement as? ReflectJavaMethod)?.member ?: