Files
kotlin-fork/compiler/testData/codegen/boxWithStdlib/fullJdk/native/privateStatic.kt
T
Alexander Udalov 72aa3d1465 Use mock JDK in compiler tests where full JDK is not needed
- move some of boxWithStdlib tests under fullJdk/ directory, where they will be
  compiled against the full JDK
- introduce FULL_JDK in-text directive for the reflection test as only 4 tests
  out of 654 needed the full JDK
2015-04-02 21:57:48 +03:00

24 lines
413 B
Kotlin
Vendored

import kotlin.jvm.*
import kotlin.platform.*
class C {
companion 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"
}