Files
kotlin-fork/compiler/testData/diagnostics/tests/operatorRem/preferRemFromCompanionObjectOverRem.kt
T
2018-07-03 16:10:37 +03:00

16 lines
294 B
Kotlin
Vendored

// !LANGUAGE: -ProhibitOperatorMod
// !DIAGNOSTICS: -UNUSED_PARAMETER
class A {
companion object {
operator fun A.rem(x: Int) = 0
}
fun test() {
<!DEPRECATED_BINARY_MOD!>operator<!> fun A.mod(x: Int) = ""
takeInt(A() % 123)
}
}
fun takeInt(x: Int) {}