[FIR] KT-55747: Report error for operator fun mod

^KT-55747 Fixed

Merge-request: KT-MR-8522
Merged-by: Nikolay Lunyak <Nikolay.Lunyak@jetbrains.com>
This commit is contained in:
Nikolay Lunyak
2023-01-30 08:48:33 +00:00
committed by Space Team
parent 37a7044e74
commit e2403c801f
40 changed files with 147 additions and 173 deletions
@@ -2,12 +2,12 @@
// !DIAGNOSTICS: -UNUSED_PARAMETER
class OldAndNew {
operator fun mod(x: Int) {}
<!DEPRECATED_BINARY_MOD!>operator<!> fun mod(x: Int) {}
operator fun rem(x: Int) {}
}
class OnlyOld {
operator fun mod(x: Int) {}
<!DEPRECATED_BINARY_MOD!>operator<!> fun mod(x: Int) {}
}
class OnlyNew {
@@ -16,11 +16,11 @@ class OnlyNew {
class Sample
operator fun Sample.mod(x: Int) {}
<!DEPRECATED_BINARY_MOD!>operator<!> fun Sample.mod(x: Int) {}
operator fun Sample.rem(x: Int) {}
class IntAndUnit {
operator fun mod(x: Int) = 0
<!DEPRECATED_BINARY_MOD!>operator<!> fun mod(x: Int) = 0
operator fun rem(x: Int): Int = 0
}