Files
kotlin/compiler/testData/codegen/box/statics/protectedStatic.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

39 lines
736 B
Kotlin
Vendored

// TODO: muted automatically, investigate should it be ran for JS or not
// IGNORE_BACKEND: JS, NATIVE
// FILE: First.java
public abstract class First {
protected static String TEST = "OK";
protected static String test() {
return TEST;
}
}
// FILE: First.kt
package anotherPackage
import First
class Second : First() {
val some = { First.TEST }
fun foo() = { First.test() }
val some2 = { TEST }
fun foo2() = { test() }
}
fun box(): String {
if (Second().some.invoke() != "OK") return "fail 1"
if (Second().foo().invoke() != "OK") return "fail 2"
if (Second().some2.invoke() != "OK") return "fail 3"
if (Second().foo2().invoke() != "OK") return "fail 4"
return "OK"
}