[K/N] Internalize TypeCastException

As a part of efforts to stabilize Native stdlib.
This commit is contained in:
Abduqodiri Qurbonzoda
2023-04-06 20:56:27 +03:00
parent df642dd3fb
commit 54bbeae273
2 changed files with 4 additions and 3 deletions
@@ -2,7 +2,7 @@ import kotlin.test.*
import objcTests.*
@Test
fun testKT35544() {
val exception = assertFailsWith<TypeCastException> {
val exception = assertFailsWith<ClassCastException> {
123 as NSString
}
assertEquals("class kotlin.Int cannot be cast to class objcTests.NSString", exception.message)
@@ -11,7 +11,7 @@ fun testKT35544() {
val bundle35544: Any = NSBundle()
@Test
fun testKT35544runtime() {
val exception = assertFailsWith<TypeCastException> {
val exception = assertFailsWith<ClassCastException> {
bundle35544 as NSString
}
assertEquals("class NSBundle cannot be cast to class objcTests.NSString", exception.message)
@@ -106,7 +106,8 @@ public actual open class ClassCastException : RuntimeException {
actual constructor(message: String?) : super(message)
}
public open class TypeCastException : ClassCastException {
@PublishedApi
internal open class TypeCastException : ClassCastException {
constructor() : super()