Support native on [platformStatic] functions
This commit is contained in:
@@ -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"
|
||||
}
|
||||
Reference in New Issue
Block a user