Files
kotlin-fork/compiler/testData/codegen/box/jvmStatic/convention.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

37 lines
505 B
Kotlin
Vendored

// TODO: muted automatically, investigate should it be ran for JS or not
// IGNORE_BACKEND: JS, NATIVE
// WITH_RUNTIME
class B(var s: Int = 0) {
}
object A {
fun test1(v: B) {
v += B(1000)
}
@JvmStatic operator fun B.plusAssign(b: B) {
this.s += b.s
}
}
fun box(): String {
val b1 = B(11)
with(A) {
b1 += B(1000)
}
if (b1.s != 1011) return "fail 1"
val b = B(11)
A.test1(b)
if (b.s != 1011) return "fail 2"
return "OK"
}