Bug 160735 - [inline] Method inlining gives illegal result.
Summary: [inline] Method inlining gives illegal result.
Status: RESOLVED INVALID
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.2.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: needinfo
Depends on:
Blocks:
 
Reported: 2006-10-12 15:32 EDT by Brian Miller CLA
Modified: 2009-08-30 02:05 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Brian Miller CLA 2006-10-12 15:32:48 EDT
Try inlining findNestedRepeatBounds().

----------------- Bug.java ----------------
class Bug {
    class Element{
        int cachedFieldIndex;
    }
    
    class RepeatingGroup{
        int size(){
            return 0;
        }
    }
    
    class Format{
        Object getValueAt(int index){
            return null;
        }
    }
    
    class State{
        Format getFormat(){
            return null;
        }
    }
    
    int findNestedRepeatBounds(final Format fmt) {
        return((RepeatingGroup)fmt.getValueAt(findVariable().cachedFieldIndex)).size();
    }
    
    Element findVariable(){
        return null;
    }
    
    {
        State state=null;
        Bug other=null;
        int count = other.findNestedRepeatBounds(state.getFormat());
    }
}
Comment 1 Martin Aeschlimann CLA 2006-10-16 09:15:14 EDT
In 3.3 this results in
    {
        State state=null;
        Bug other=null;
        int count = ((RepeatingGroup)state.getFormat().getValueAt(other.findVariable().cachedFieldIndex)).size();
    }

which seems correct, no?
Comment 2 Martin Aeschlimann CLA 2006-10-17 07:03:34 EDT
I need more input here...
Comment 3 Denis Roy CLA 2009-08-30 02:05:23 EDT
As of now 'LATER' and 'REMIND' resolutions are no longer supported.
Please reopen this bug if it is still valid for you.