On Fri, 5 Dec 2003, Peter W. Draper wrote:
> Hi Mark,
>
> I think this is related to bug report:
>
> http://developer.java.sun.com/developer/bugParade/bugs/4905020.html
>
> for 1.4.2, which has the evaluation:
>
> "The compiler is right to reject this; private methods are not inherited,
> therefore the method being called is not a member of the inner class and
> should not be found by the compiler. Previous compilers accepted this
> code erroneously."
>
> The solution is just to use "super.doStuff()" (which occurred to me, but
> reading the analysis now looks odd too).
thanks a lot - your bug parade searching skills are obviously superior
to mine. My response to the statement above is exactly the same as
that of the respondent - it should pick it up because it's in its
enclosing class not because it's in its superclass (there's no problem
if the methods have different names). I find the justification given
by Sun a bit unsatisfying, but I don't intend to argue with them
about the details of the JLS.
cheers
Mark
--
Mark Taylor Starlink Programmer Physics, Bristol University, UK
[log in to unmask] +44-117-928-8776 http://www.star.bris.ac.uk/~mbt/
|