Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Compiler bug?



Rolf Howarth <email@hidden> wrote:

>I tried compiling just the parent class rather than my entire project
>and this time a couple of other, different inner classes fail to be
>output ($50 and $51 I think).
>
>... I'm using java 1.4.2_05 under Mac OS X 10.3.8.
>
>If I compile the same code with CodeWarrior, or with the
>compiler="jikes" option in ant, all the inner classes are generated
>as expected. However, I can't use jikes because I need to generate
>1.1 compatible class files. However, that doesn't seem to be a
>determining factor as javac fails whether or not I specify the target
>version.

I puzzled over this for a while, hence the delay in my reply.

As an experiment, see if you can get Ant to compile using the 1.3.1 'javac'
command, which should still be present in:
 /System/Library/Frameworks/JavaVM.framework/Versions/1.3.1/Commands/

That'd only work if you aren't using 1.4-compatible source, but since you
said you need 1.1-compatible class-files, it might work.


>Has anyone seen anything like this before??

Not even close.  Any time I've seen classes not compile, the compiler has
complained.

One weird possibility is that maybe it's putting the missing inner classes
somewhere else, for some bizarre reason.  No, I haven't seen anything like
that before, either, but it's a thought.

Or maybe there's some silent limit to the number of inner classes in a
single source file.  You might try some minor surgery on the source to see
if that makes a difference.  For that, I assume avoiding the problem or
working around it is almost as good as fixing it outright.

And if it's not obvious, I'm guessing semi-randomly at this point.


If you get a chance to compile it on 1.4.2 on Windows or Linux, see if the
bug occurs, there, too.

And if you can get the well-isolated fail-case, please submit the bug to Apple.


>public static final XyzAccessor FIELD_X = new XyzAccessor("X") {
>   public Object getValue(Xyz obj) { return obj.getX(); }
>};
>public static final XyzAccessor FIELD_Y = new XyzAccessor("Y") {
>   public Object getValue(Xyz obj) { return obj.getY(); }
>};
>etc.
>
>There doesn't seem to be anything special about the particular
>accessors which are failing.

Maybe the compiler is accidentally synthesizing the magic word "xyzzy",
which causes things to move in mysterious ways.  Or does that only work in
a maze of twisty passages, all different?

  -- GG


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.