Prohibit operator mod as declaration and calls that resolved via it
#KT-24197 Fixed
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
// "Remove 'operator' modifier" "true"
|
||||
// COMPILER_ARGUMENTS: -XXLanguage:+ProhibitOperatorMod
|
||||
|
||||
object A {
|
||||
operator<caret> fun mod(x: Int) {}
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
// "Remove 'operator' modifier" "true"
|
||||
// COMPILER_ARGUMENTS: -XXLanguage:+ProhibitOperatorMod
|
||||
|
||||
object A {
|
||||
fun mod(x: Int) {}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
// "Rename to 'rem'" "true"
|
||||
// DISABLE-ERRORS
|
||||
// COMPILER_ARGUMENTS: -XXLanguage:+ProhibitOperatorMod
|
||||
|
||||
object Rem {
|
||||
operator<caret> fun mod(x: Int) {}
|
||||
operator fun modAssign(x: Int) {}
|
||||
}
|
||||
|
||||
fun test() {
|
||||
Rem % 1
|
||||
Rem.mod(1)
|
||||
Rem.modAssign(1)
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
// "Rename to 'rem'" "true"
|
||||
// DISABLE-ERRORS
|
||||
// COMPILER_ARGUMENTS: -XXLanguage:+ProhibitOperatorMod
|
||||
|
||||
object Rem {
|
||||
operator fun rem(x: Int) {}
|
||||
operator fun modAssign(x: Int) {}
|
||||
}
|
||||
|
||||
fun test() {
|
||||
Rem % 1
|
||||
Rem.rem(1)
|
||||
Rem.modAssign(1)
|
||||
}
|
||||
Reference in New Issue
Block a user