diff --git a/plugins/kotlin/idea/tests/test/org/jetbrains/kotlin/idea/refactoring/introduce/ExtractionTestGenerated.java b/plugins/kotlin/idea/tests/test/org/jetbrains/kotlin/idea/refactoring/introduce/ExtractionTestGenerated.java index 8b84c5a1fe26..696ffa9cb3da 100644 --- a/plugins/kotlin/idea/tests/test/org/jetbrains/kotlin/idea/refactoring/introduce/ExtractionTestGenerated.java +++ b/plugins/kotlin/idea/tests/test/org/jetbrains/kotlin/idea/refactoring/introduce/ExtractionTestGenerated.java @@ -3656,6 +3656,11 @@ public abstract class ExtractionTestGenerated extends AbstractExtractionTest { runTest("testData/refactoring/introduceParameter/return.kt"); } + @TestMetadata("sameNameFunctionNoConflict.kt") + public void testSameNameFunctionNoConflict() throws Exception { + runTest("testData/refactoring/introduceParameter/sameNameFunctionNoConflict.kt"); + } + @TestMetadata("secondaryConstructorWithDefaultValue.kt") public void testSecondaryConstructorWithDefaultValue() throws Exception { runTest("testData/refactoring/introduceParameter/secondaryConstructorWithDefaultValue.kt"); diff --git a/plugins/kotlin/idea/tests/testData/refactoring/introduceParameter/sameNameFunctionNoConflict.kt b/plugins/kotlin/idea/tests/testData/refactoring/introduceParameter/sameNameFunctionNoConflict.kt new file mode 100644 index 000000000000..6b7b0e87d6fe --- /dev/null +++ b/plugins/kotlin/idea/tests/testData/refactoring/introduceParameter/sameNameFunctionNoConflict.kt @@ -0,0 +1,8 @@ +fun String.bar() = 0 +class Foo { + fun bar(): String { + return "bar" + } +} + +// IGNORE_K1 \ No newline at end of file diff --git a/plugins/kotlin/idea/tests/testData/refactoring/introduceParameter/sameNameFunctionNoConflict.kt.after b/plugins/kotlin/idea/tests/testData/refactoring/introduceParameter/sameNameFunctionNoConflict.kt.after new file mode 100644 index 000000000000..5e44d1f6e51c --- /dev/null +++ b/plugins/kotlin/idea/tests/testData/refactoring/introduceParameter/sameNameFunctionNoConflict.kt.after @@ -0,0 +1,8 @@ +fun String.bar() = 0 +class Foo { + fun bar(string: String = "bar"): String { + return string + } +} + +// IGNORE_K1 diff --git a/plugins/kotlin/refactorings/kotlin.refactorings.tests.k2/test/org/jetbrains/kotlin/idea/k2/refactoring/introduce/K2IntroduceParameterTestGenerated.java b/plugins/kotlin/refactorings/kotlin.refactorings.tests.k2/test/org/jetbrains/kotlin/idea/k2/refactoring/introduce/K2IntroduceParameterTestGenerated.java index c79aa00bcf2e..da5da2734de0 100644 --- a/plugins/kotlin/refactorings/kotlin.refactorings.tests.k2/test/org/jetbrains/kotlin/idea/k2/refactoring/introduce/K2IntroduceParameterTestGenerated.java +++ b/plugins/kotlin/refactorings/kotlin.refactorings.tests.k2/test/org/jetbrains/kotlin/idea/k2/refactoring/introduce/K2IntroduceParameterTestGenerated.java @@ -400,6 +400,11 @@ public abstract class K2IntroduceParameterTestGenerated extends AbstractK2Introd runTest("../../idea/tests/testData/refactoring/introduceParameter/return.kt"); } + @TestMetadata("sameNameFunctionNoConflict.kt") + public void testSameNameFunctionNoConflict() throws Exception { + runTest("../../idea/tests/testData/refactoring/introduceParameter/sameNameFunctionNoConflict.kt"); + } + @TestMetadata("secondaryConstructorWithDefaultValue.kt") public void testSecondaryConstructorWithDefaultValue() throws Exception { runTest("../../idea/tests/testData/refactoring/introduceParameter/secondaryConstructorWithDefaultValue.kt");