Fix "kotlin.TypeCastException has no message on Native"
#KT-35544 Fixed Merge-request: KT-MR-6392 Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com>
This commit is contained in:
@@ -32,8 +32,8 @@ fun ThrowClassCastException(instance: Any, typeInfo: NativePtr): Nothing {
|
||||
}
|
||||
|
||||
@ExportForCppRuntime
|
||||
fun ThrowTypeCastException(): Nothing {
|
||||
throw TypeCastException()
|
||||
fun ThrowTypeCastException(instance: Any, typeName: String): Nothing {
|
||||
throw TypeCastException("${instance::class} cannot be cast to class $typeName")
|
||||
}
|
||||
|
||||
@ExportForCppRuntime
|
||||
|
||||
Reference in New Issue
Block a user