diff --git a/idea/testData/intentions/operatorToFunction/assignment.kt b/idea/testData/intentions/operatorToFunction/assignment.kt new file mode 100644 index 00000000000..ad6ec3cb8bb --- /dev/null +++ b/idea/testData/intentions/operatorToFunction/assignment.kt @@ -0,0 +1,9 @@ +interface C { + operator fun set(p: String, value: Int) +} + +class D(val c: C) { + fun foo() { + this.c[""] = 10 + } +} diff --git a/idea/testData/intentions/operatorToFunction/assignment.kt.after b/idea/testData/intentions/operatorToFunction/assignment.kt.after new file mode 100644 index 00000000000..9183b744f77 --- /dev/null +++ b/idea/testData/intentions/operatorToFunction/assignment.kt.after @@ -0,0 +1,9 @@ +interface C { + operator fun set(p: String, value: Int) +} + +class D(val c: C) { + fun foo() { + this.c.set("", 10) + } +} diff --git a/idea/tests/org/jetbrains/kotlin/idea/intentions/IntentionTestGenerated.java b/idea/tests/org/jetbrains/kotlin/idea/intentions/IntentionTestGenerated.java index 0b34a66d13a..bb5b9bd88d0 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/intentions/IntentionTestGenerated.java +++ b/idea/tests/org/jetbrains/kotlin/idea/intentions/IntentionTestGenerated.java @@ -5859,6 +5859,12 @@ public class IntentionTestGenerated extends AbstractIntentionTest { doTest(fileName); } + @TestMetadata("assignment.kt") + public void testAssignment() throws Exception { + String fileName = JetTestUtils.navigationMetadata("idea/testData/intentions/operatorToFunction/assignment.kt"); + doTest(fileName); + } + @TestMetadata("binaryEqualsEqualsNullableOperands.kt") public void testBinaryEqualsEqualsNullableOperands() throws Exception { String fileName = JetTestUtils.navigationMetadata("idea/testData/intentions/operatorToFunction/binaryEqualsEqualsNullableOperands.kt");