IDEA-109576

This commit is contained in:
Anna Kozlova
2013-06-27 16:24:17 +04:00
parent 41a3739e4d
commit 17ff190b7c
5 changed files with 45 additions and 1 deletions
@@ -0,0 +1,3 @@
public class Test {
public void m() {}
}
@@ -0,0 +1,18 @@
import java.util.List;
class TestSubclass extends Test {
}
class Base {
public void main(List<Test> tests) {
for (Test test : tests) {}
}
}
class Inheritor extends Base {
@Override
public void main(List<Test> tests) {
super.main(tests);
}
}
@@ -0,0 +1,19 @@
import java.util.List;
class Test {
public void m() {}
}
class Base {
public void main(List<Test> tests) {
for (Test test : tests) {}
}
}
class Inheritor extends Base {
@Override
public void main(List<Test> tests) {
super.main(tests);
}
}
@@ -56,6 +56,11 @@ public class ExtractSuperClassTest extends RefactoringTestCase {
doTest("Test", "TestSubclass", new RefactoringTestUtil.MemberDescriptor("m", PsiMethod.class));
}
public void testEmptyForeach() throws Exception {
doTest("Test", "TestSubclass", new RefactoringTestUtil.MemberDescriptor("m", PsiMethod.class));
}
public void testConflictUsingPrivateMethod() throws Exception {
doTest("Test", "TestSubclass",
new String[] {"Method <b><code>Test.foo()</code></b> is private and will not be accessible from method <b><code>x()</code></b>."},