Files
kotlin-fork/js/js.translator/testData/box/operatorOverloading/usingModInCaseModAssignNotAvailable.kt
T
Ivan Kylchik 4deab9693e [JS TESTS] Remove LANGUAGE_VERSION directive
Some of them are not necessary at all, others can be replaced with
`!LANGUAGE` directive with exclusion of corresponding features.
2021-10-25 00:14:20 +03:00

17 lines
305 B
Kotlin
Vendored

// !LANGUAGE: -ProhibitOperatorMod
// 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"
}