Bug 178085 - [push down] Push down field to class declared locally is disallowed
Summary: [push down] Push down field to class declared locally is disallowed
Status: ASSIGNED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.3   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2007-03-19 12:21 EDT by Brett Daniel CLA
Modified: 2022-10-10 05:47 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Brett Daniel CLA 2007-03-19 12:21:48 EDT
Build ID: I20070222-0951

Steps To Reproduce:
Attempting to push down field f in the following is disallowed.

class A {
    int f;
    
    void mA(){
        class B extends A {
            public void mB(){
                super.f = 0;
            }
        }
    }
}

The error message says "Push Down is not allowed on type 'A', since it does not have subclasses to which members could be pushed down".  However, it should be able to push the field down to B which is declared locally. 

More information:
Comment 1 Markus Keller CLA 2007-07-02 13:53:28 EDT
After saving the editor, push down can be started on f. However, the refactoring reports an error because it cannot replace super.f by f:

class A {
    void mA(){
        class B extends A {
            int f;

			public void mB(){
                super.f = 0;
            }
        }
    }
}
Comment 2 Eclipse Genie CLA 2020-08-11 10:51:35 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.
Comment 3 Eclipse Genie CLA 2022-10-10 05:47:03 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.