Fix access to private static native functions

This commit is contained in:
Andrey Breslav
2014-12-02 14:31:46 +03:00
parent f9fea88749
commit 120c344f11
7 changed files with 85 additions and 18 deletions
@@ -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"
}