.java to binary compilation problem

Fredrik Warg warg@ce.chalmers.se
Mon Nov 1 13:43:00 GMT 1999


> Per Bothner wrote:
> > 
> > Jeff Sturm <jsturm@sigma6.com> writes:
> > 
> > > gcj seems to have trouble with ambiguous syntax, like member names vs.
> > > subpackages.  Try shortening this to:
> > >
> > >   public boolean func() { Context.out.println( "Yo!"); }
> > >
> > > and use an explicit import:
> > >
> > >   import spec.harness.Context;
> > >
> > > Let us know if that compiles.

Yes, it compiles :) I didn't even need that explicit import
(after all, I already had import spec.harness.*) but reducing
spec.harness.Context.out.println("Yo!")
...to...
Context.out.println("Yo!")
worked out.

> 6.5.2 describes a recursive process to resolve contextually ambiguous
> names.  It seems to say a statement like:
> 
>   java.lang.System.out.println(msg);
> 
> should compile.  Javac will compile it, gcj cannot.

Hmmm, so this a bug in gcj then? 

Thanks for the help!

/Fredrik

-------------------------------------
Fredrik Warg -- [warg@ce.chalmers.se]




More information about the Java mailing list