Skip to content

Commit

Permalink
[Native][tests] Add ExperimentalForeignApi opt-in for failing test
Browse files Browse the repository at this point in the history
^KT-71333
  • Loading branch information
ddolovov authored and qodana-bot committed Oct 1, 2024
1 parent 4cc9523 commit 7566565
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
// FIR_IDENTICAL
// WITH_PLATFORM_LIBS
import kotlinx.cinterop.ExperimentalForeignApi
import platform.darwin.*
import platform.Foundation.*

class Foo : NSObject(), NSPortDelegateProtocol {
@OptIn(ExperimentalForeignApi::class)
// ^^^ Added opt-in because of the difference in NSPortDelegateProtocol.handlePortMessage() signature
// on different platforms. On some targets, the signature uses experimental C-interop API.
//
// Examples:
// macos_arm64: public open fun handlePortMessage(message: platform.Foundation.NSPortMessage)
// ios_simulator_arm64: public open fun handlePortMessage(message: objcnames.classes.NSPortMessage)
fun foo() {
super.handlePortMessage(TODO())
}
Expand Down

0 comments on commit 7566565

Please sign in to comment.