Fix access to private static native functions
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
import kotlin.jvm.*
|
||||
import kotlin.platform.*
|
||||
|
||||
class C {
|
||||
class object {
|
||||
private platformStatic native fun foo()
|
||||
}
|
||||
|
||||
fun bar() {
|
||||
foo()
|
||||
}
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
try {
|
||||
C().bar()
|
||||
return "Link error expected"
|
||||
}
|
||||
catch (e: java.lang.UnsatisfiedLinkError) {
|
||||
if (e.getMessage() != "C.foo()V") return "Fail 1: " + e.getMessage()
|
||||
}
|
||||
|
||||
return "OK"
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
import kotlin.platform.platformStatic
|
||||
|
||||
object A {
|
||||
|
||||
private platformStatic fun a(): String {
|
||||
return "OK"
|
||||
}
|
||||
|
||||
object Z {
|
||||
val p = a()
|
||||
}
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
return A.Z.p
|
||||
}
|
||||
Reference in New Issue
Block a user