Files
kotlin-fork/compiler/testData/diagnostics/tests/operatorRem/preferRemWithImplicitReceivers.kt
T
2016-12-09 16:59:26 +03:00

19 lines
298 B
Kotlin
Vendored

// !DIAGNOSTICS: -UNUSED_PARAMETER
class A {
<!DEPRECATED_BINARY_MOD!>operator<!> fun Int.mod(s: String) = 4
}
class B {
operator fun Int.rem(s: String) = ""
}
fun test() {
with(B()) {
with(A()) {
takeString(1 % "")
}
}
}
fun takeString(s: String) {}