diff --git a/idea/testData/intentions/conventionNameCalls/replaceCallWithBinaryOperator/modSanityTest.kt b/idea/testData/intentions/conventionNameCalls/replaceCallWithBinaryOperator/modSanityTest.kt index 6d057118a73..ce5206d04ef 100644 --- a/idea/testData/intentions/conventionNameCalls/replaceCallWithBinaryOperator/modSanityTest.kt +++ b/idea/testData/intentions/conventionNameCalls/replaceCallWithBinaryOperator/modSanityTest.kt @@ -1,4 +1,6 @@ -// INTENTION_TEXT: Replace with '%' operator +// INTENTION_TEXT: Replace call with binary operator +// IS_APPLICABLE: false + fun test() { class Test { operator fun mod(a: Int): Test = Test() diff --git a/idea/testData/intentions/conventionNameCalls/replaceCallWithBinaryOperator/modSanityTest.kt.after b/idea/testData/intentions/conventionNameCalls/replaceCallWithBinaryOperator/modSanityTest.kt.after index a86efcf57fa..645715d4a78 100644 --- a/idea/testData/intentions/conventionNameCalls/replaceCallWithBinaryOperator/modSanityTest.kt.after +++ b/idea/testData/intentions/conventionNameCalls/replaceCallWithBinaryOperator/modSanityTest.kt.after @@ -1,4 +1,6 @@ // INTENTION_TEXT: Replace with '%' operator +// IS_APPLICABLE: false + fun test() { class Test { operator fun mod(a: Int): Test = Test() diff --git a/idea/testData/intentions/conventionNameCalls/replaceCallWithBinaryOperator/remSanityTest.kt b/idea/testData/intentions/conventionNameCalls/replaceCallWithBinaryOperator/remSanityTest.kt new file mode 100644 index 00000000000..87f2f294035 --- /dev/null +++ b/idea/testData/intentions/conventionNameCalls/replaceCallWithBinaryOperator/remSanityTest.kt @@ -0,0 +1,9 @@ +// INTENTION_TEXT: Replace with '%' operator + +fun test() { + class Test { + operator fun rem(a: Int): Test = Test() + } + val test = Test() + test.rem(1) +} diff --git a/idea/testData/intentions/conventionNameCalls/replaceCallWithBinaryOperator/remSanityTest.kt.after b/idea/testData/intentions/conventionNameCalls/replaceCallWithBinaryOperator/remSanityTest.kt.after new file mode 100644 index 00000000000..f4644be3f76 --- /dev/null +++ b/idea/testData/intentions/conventionNameCalls/replaceCallWithBinaryOperator/remSanityTest.kt.after @@ -0,0 +1,9 @@ +// INTENTION_TEXT: Replace with '%' operator + +fun test() { + class Test { + operator fun rem(a: Int): Test = Test() + } + val test = Test() + test % 1 +} diff --git a/idea/tests/org/jetbrains/kotlin/idea/intentions/IntentionTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/intentions/IntentionTestGenerated.java index 1deba1e1b61..a4e8cee69ba 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/intentions/IntentionTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/intentions/IntentionTestGenerated.java @@ -3054,6 +3054,12 @@ public class IntentionTestGenerated extends AbstractIntentionTest { doTest(fileName); } + @TestMetadata("remSanityTest.kt") + public void testRemSanityTest() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/conventionNameCalls/replaceCallWithBinaryOperator/remSanityTest.kt"); + doTest(fileName); + } + @TestMetadata("safeCompareTo.kt") public void testSafeCompareTo() throws Exception { String fileName = KotlinTestUtils.navigationMetadata("idea/testData/intentions/conventionNameCalls/replaceCallWithBinaryOperator/safeCompareTo.kt");