mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-09 20:42:52 +07:00
check for conflicts with escalate visibility setting on (IDEA-88719)
This commit is contained in:
@@ -104,7 +104,7 @@ public class PullUpConflictsUtil {
|
||||
}
|
||||
}
|
||||
}
|
||||
RefactoringConflictsUtil.analyzeAccessibilityConflicts(movedMembers, superClass, conflicts, null, targetRepresentativeElement, abstrMethods);
|
||||
RefactoringConflictsUtil.analyzeAccessibilityConflicts(movedMembers, superClass, conflicts, VisibilityUtil.ESCALATE_VISIBILITY, targetRepresentativeElement, abstrMethods);
|
||||
if (superClass != null) {
|
||||
if (movedMembers2Super) {
|
||||
checkSuperclassMembers(superClass, infos, conflicts);
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
class Foo {
|
||||
|
||||
}
|
||||
|
||||
class FooImpl extends Foo {
|
||||
private void fo<caret>o(){}
|
||||
void bar() {
|
||||
foo();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
class Foo {
|
||||
|
||||
protected void foo(){}
|
||||
}
|
||||
|
||||
class FooImpl extends Foo {
|
||||
void bar() {
|
||||
foo();
|
||||
}
|
||||
}
|
||||
@@ -117,6 +117,10 @@ public class PullUpTest extends LightRefactoringTestCase {
|
||||
|
||||
public void testTypeParamsConflictingNames() throws Exception {
|
||||
doTest(false, new RefactoringTestUtil.MemberDescriptor("foo", PsiMethod.class));
|
||||
}
|
||||
|
||||
public void testEscalateVisibility() throws Exception {
|
||||
doTest(false, new RefactoringTestUtil.MemberDescriptor("foo", PsiMethod.class));
|
||||
}
|
||||
|
||||
private void doTest(RefactoringTestUtil.MemberDescriptor... membersToFind) throws Exception {
|
||||
|
||||
Reference in New Issue
Block a user