Bug 21116 - Can't compile because eclipse says that the method is not visible
Summary: Can't compile because eclipse says that the method is not visible
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows NT
: P2 critical (vote)
Target Milestone: 2.0.1   Edit
Assignee: Philipe Mulet CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 22149 (view as bug list)
Depends on:
Blocks:
 
Reported: 2002-06-28 08:00 EDT by Michael Lupp CLA
Modified: 2002-09-20 09:01 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 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.