Files
kotlin-fork/compiler/testData/codegen/box/jvmField/publicField.kt
T
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

29 lines
541 B
Kotlin
Vendored

// TODO: muted automatically, investigate should it be ran for JS or not
// IGNORE_BACKEND: JS, NATIVE
// WITH_RUNTIME
class A {
@JvmField public val field = "OK";
companion object {
@JvmField public val cfield = "OK";
}
}
object Object {
@JvmField public val field = "OK";
}
fun box(): String {
var result = A().field
if (result != "OK") return "fail 1: $result"
if (A.cfield != "OK") return "fail 2: ${A.cfield}"
if (Object.field != "OK") return "fail 3: ${Object.field}"
return "OK"
}