package foo import kotlin.jvm.* class WithNative { external fun foo() } fun box(): String { try { WithNative().foo() return "Link error expected" } catch (e: java.lang.UnsatisfiedLinkError) { return "OK" } }