Files
kotlin/compiler/testData/codegen/box/jvmStatic/importStaticMemberFromObject.kt
Ilya Matveev a5e4e0284e Mute some box tests for native backend
This patch mutes the following test categories:
   * Tests with java dependencies (System class,
     java stdlib, jvm-oriented annotations etc).
   * Coroutines tests.
   * Reflection tests.
   * Tests with an inheritance from the standard
     collections.
2017-03-10 19:59:37 +03:00

36 lines
519 B
Kotlin
Vendored

// TODO: muted automatically, investigate should it be ran for JS or not
// IGNORE_BACKEND: JS, NATIVE
// WITH_RUNTIME
import O.p
import O.f
import C.Companion.p1
import C.Companion.f1
object O {
@JvmStatic
fun f(): Int = 3
@JvmStatic
val p: Int = 6
}
class C {
companion object {
@JvmStatic
fun f1(): Int = 3
@JvmStatic
val p1: Int = 6
}
}
fun box(): String {
if (p + f() != 9) return "fail"
if (p1 + f1() != 9) return "fail2"
return "OK"
}