mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-09 08:31:29 +00:00
20 lines
407 B
Kotlin
20 lines
407 B
Kotlin
package foo
|
|
|
|
import kotlin.jvm.*
|
|
import kotlin.platform.*
|
|
|
|
native fun bar(l: Long, s: String): Double
|
|
|
|
fun box(): String {
|
|
var d = 0.0
|
|
|
|
try {
|
|
d = bar(1, "")
|
|
return "Link error expected on object"
|
|
}
|
|
catch (e: java.lang.UnsatisfiedLinkError) {
|
|
if (e.getMessage() != "foo.FooPackage.bar(JLjava/lang/String;)D") return "Fail 1: " + e.getMessage()
|
|
}
|
|
|
|
return "OK"
|
|
} |