Files
kotlin-fork/kotlin-native/backend.native/tests/interop/forwardDeclarationsCast/main.kt
T
Pavel Kunyavskiy 396cfb3956 [K/N] Make cast to objc forward declaration unchecked
Before this commit it caused compiler crash.
Unchecked cast warning to be done later.

^KT-59645
2023-07-05 06:49:34 +00:00

13 lines
490 B
Kotlin

@file:OptIn(kotlinx.cinterop.ExperimentalForeignApi::class)
import a.*
import b.*
fun main() {
if (testStruct(produceStruct()) != "Struct") throw IllegalStateException()
if (testClass(produceClass()) != "Class") throw IllegalStateException()
if (testProtocol(produceProtocol()) != "Protocol") throw IllegalStateException()
if (testClass2(produceClass()) != "Class") throw IllegalStateException()
if (testProtocol2(produceProtocol()) != "Protocol") throw IllegalStateException()
}