Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 105004

Summary: [inline] does not consider calls to outer-class methods
Product: [Eclipse Project] JDT Reporter: David Saff <david>
Component: UIAssignee: Markus Keller <markus.kell.r>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: bmiller, Brian.Miller
Version: 3.1   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard: stalebug

Description David Saff CLA 2005-07-25 09:36:51 EDT
In N20050725-0010.

Given code:

public class Foo {
	public class Bar {
		void a1() {
			a2();
		}
	}
	
	void a2() {
	}
}

class Client {
	void foo(Foo.Bar b) {
		b.a1();
	}
}

Inline a1.  The result does not compile.
Comment 1 Dirk Baeumer CLA 2005-07-26 05:04:30 EDT
I only see two choises, since the code can't be made compile on the client side:

1.) inline method will be disallowed on methods referencing code form outer  
    classes.
2.) inline method generates bridge methods for all methods referenced from outer
    classes so that they are visible for the client.

I opt to do 1.). since inlining

		void a1() {
			Foo.this.a2();
		}

is currently disallowed as well.
Comment 2 Eclipse Genie CLA 2020-02-19 10:29:27 EST
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. As such, we're closing this bug.

If you have further information on the current state of the bug, please add it and reopen this bug. 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.