This is the mail archive of the java-discuss@sourceware.cygnus.com mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: .java to binary compilation problem



> 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]



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]