This is the mail archive of the
mailing list for the Mauve project.
Re: FYI: added explicit constructor to avoid interpretation of its visibility
- From: ericblake at comcast dot net (Eric Blake)
- To: Olivier Jolly <olivier dot jolly at pcedev dot com>, mauve-patches at sources dot redhat dot com
- Date: Wed, 15 Feb 2006 01:02:28 +0000
- Subject: Re: FYI: added explicit constructor to avoid interpretation of its visibility
> as explained on the classpath ml, there is an interpretation of the
> JLS which makes different compilers produce different visibility for the
> constructor of a private inner classe without explicit constructor
> (namely private with jikes, and non private with ecj). To avoid this
> ambiguity, I added this constructor explicitely.
> I wonder whether this kind of test should be added in jacks.
Jacks already tests this. ecj is buggy - the JLS requires default
constructors to have the same visibility as their enclosing class,
so private inner classes default to private constructors. Furthermore,
calling a private constructor from the outer class requires
a default-visibility bridge constructor, so it is always a good idea
to explicitly declare constructors of private inner classes in order to
avoid having to use the bridge constructor.