Files
kotlin-fork/compiler/testData/codegen/box/external/jvmStaticExternalPrivate.kt
T
2019-11-19 11:00:09 +03:00

29 lines
465 B
Kotlin
Vendored

// IGNORE_BACKEND_FIR: JVM_IR
// IGNORE_BACKEND: JVM_IR
// TARGET_BACKEND: JVM
// WITH_RUNTIME
// FULL_JDK
class C {
companion object {
private @JvmStatic external fun foo()
}
fun bar() {
foo()
}
}
fun box(): String {
try {
C().bar()
return "Link error expected"
}
catch (e: java.lang.UnsatisfiedLinkError) {
if (e.message != "C.foo()V") return "Fail 1: " + e.message
}
return "OK"
}