Files
kotlin-fork/js/js.translator/testData/box/operatorOverloading/usingModInCaseModAssignNotAvailable.kt
T
2016-09-29 12:00:41 +03:00

15 lines
236 B
Kotlin
Vendored

package foo
class A() {
var p = "yeah"
operator fun mod(other: A): A {
return A();
}
}
fun box(): String {
var c = A()
val d = c;
c %= A();
return if ((c != d) && (c.p == "yeah")) "OK" else "fail"
}