From b203c02fbd08cc9af309752a7d2efe21bb53c429 Mon Sep 17 00:00:00 2001 From: peter Date: Tue, 20 Nov 2012 17:37:48 +0100 Subject: [PATCH] a test for IDEA-95228 Copy reference does not work correctly on overloaded methods. --- .../codeInsight/CopyReferenceTest.groovy | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/java/java-tests/testSrc/com/intellij/codeInsight/CopyReferenceTest.groovy b/java/java-tests/testSrc/com/intellij/codeInsight/CopyReferenceTest.groovy index 116b0f211ad3..2ec1ed6a7b12 100644 --- a/java/java-tests/testSrc/com/intellij/codeInsight/CopyReferenceTest.groovy +++ b/java/java-tests/testSrc/com/intellij/codeInsight/CopyReferenceTest.groovy @@ -58,6 +58,32 @@ public class CopyReferenceTest extends LightCodeInsightFixtureTestCase { myFixture.checkResult "/a.java:2" } + public void _testMethodOverloadCopy() { + myFixture.configureByText 'a.java', ''' +class Koo { + public void foo(int a) { } + public void foo(boolean a) { } + + { + foo(true); + } +}''' + performCopy() + myFixture.configureByText 'b.java', ''' +/** + * + */ +class Koo2 { } +''' + performPaste() + myFixture.checkResult ''' +/** + * Koo#foo(boolean) + */ +class Koo2 { } +''' + } + private void doTest() throws Exception { String name = getTestName(false); myFixture.configureByFile(name + ".java");