[K/N] Internalize TypeCastException
As a part of efforts to stabilize Native stdlib.
This commit is contained in:
@@ -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()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user