Bug 99477 - [inline] Allow simple function to be inlined into non-assignment statement.
Summary: [inline] Allow simple function to be inlined into non-assignment statement.
Status: NEW
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Markus Keller CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-06-10 17:19 EDT by Brian Miller CLA
Modified: 2006-06-02 06:17 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 Brian Miller CLA 2005-06-10 17:19:51 EDT
Attempt to inline method 'second' is rejected saying "Inlining is only 
possible on simple functions or functions used in an assigment."

-------------------------- Bug.java ------------------
class Bug {
    void first (){
        second().toString();
    }
    String second() {
       String p = new String();     
       return p;
    }
}
Comment 1 Dirk Baeumer CLA 2005-06-10 18:11:19 EDT
You can first inline p and then inline second.