Files
kotlin-fork/js/js.translator/testData/box/operatorOverloading/usingModInCaseModAssignNotAvailable.kt
T
2018-09-12 09:49:25 +03:00

17 lines
295 B
Kotlin
Vendored

// LANGUAGE_VERSION: 1.1
// EXPECTED_REACHABLE_NODES: 1284
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"
}