Bug 21116

Summary: Can't compile because eclipse says that the method is not visible
Product: [Eclipse Project] JDT Reporter: Michael Lupp <m.lupp>
Component: CoreAssignee: Philipe Mulet <philippe_mulet>
Status: VERIFIED FIXED QA Contact:
Severity: critical    
Priority: P2 CC: eclipse
Version: 2.0   
Target Milestone: 2.0.1   
Hardware: PC   
OS: Windows NT   
Whiteboard:

Description Michael Lupp CLA 2002-06-28 08:00:37 EDT
In our project we have a class B in package BP that inherits from class A in
package AP. Class A has an protected method M1. Class B has an inner class BIC
that calls method AP.

Eclipse couldn't compile class B and I get the error that the method AP is not
visible. But it compiles, when I compile it only with JDK 1.3.1 and without
eclipse. This seems to be a bug in eclipse.
Comment 1 Michael Lupp CLA 2002-06-28 08:23:21 EDT
Sorry, I think my description was unprecise, so here is an code example:

-------------
package AP;

public abstract class A {
	protected AIC memberA;

	protected class AIC {
		public void methodAIC(String paramater) {
		  // ....do something
		}
	}

}
-------------

-------------
package BP;
public class B extends AP.A {
	private class BIC {
		public void methodBIC(String param) {
			memberA.methodAIC(param);
		}
	}
}
-------------

In ecplise I get the error that the methode 'methodAIC' in 'methodeBIC' ist not
visible.
Comment 2 Philipe Mulet CLA 2002-07-01 10:53:31 EDT
Reproduced. Indeed, this sounds like our bug.
Comment 3 Philipe Mulet CLA 2002-07-01 11:10:17 EDT
We had implemented the proper visibility check, but left in the old one which 
was still being used in this case. Removing the old code is now running through 
the new code (similar to field and method visibility check).

Need to re-run jcks to assess quality. This is quite unfortunate.
Comment 4 Philipe Mulet CLA 2002-07-01 11:37:31 EDT
Fixed in latest internal.
Comment 5 Philipe Mulet CLA 2002-08-12 09:12:38 EDT
*** Bug 22149 has been marked as a duplicate of this bug. ***
Comment 6 David Audel CLA 2002-08-19 05:22:25 EDT
Verified.
Comment 7 Jerome Lanneluc CLA 2002-08-20 05:17:17 EDT
Verified
Comment 8 David Audel CLA 2002-09-20 09:01:02 EDT
Verified in 2.1 M1.