Support native on [platformStatic] functions

This commit is contained in:
Andrey Breslav
2014-11-18 14:27:10 +03:00
parent cba6652c05
commit d20651b881
3 changed files with 36 additions and 2 deletions
@@ -0,0 +1,27 @@
import kotlin.jvm.*
import kotlin.platform.*
class WithNative {
class object {
platformStatic native fun bar() {}
}
}
object ObjWithNative {
platformStatic native fun bar() {}
}
fun box(): String {
try {
WithNative.bar()
return "Link error expected"
}
catch (e: java.lang.UnsatisfiedLinkError) {}
try {
ObjWithNative.bar()
return "Link error expected on object"
}
catch (e: java.lang.UnsatisfiedLinkError) {}
return "OK"
}