refering to inner classes from imports doesn't work

Nic Ferrier nferrier@tapsellferrier.co.uk
Thu Feb 7 18:04:00 GMT 2002


Bryce McKinlay <bryce@waitaki.otago.ac.nz> writes:
> Nic Ferrier wrote: 
>> >import A.X; 
> > 
> >public class B 
> >{ 
> > public void someThing () 
> > { 
> > X var = A.createSomething(); 
> > var.someMethod(); 
> > } 
> >} 
> > 
>> This is actually not legal because you cannot import a class from the 
> default package. Some versions of javac did accept this code, but JDK 
> 1.4's will not. GCJ needs to report an error like "A is not a package". 
>> In the case where A is in package "pkg" and you do an "import pkg.A.X", 
> it is legal. 

Ah... I was being econmical with the description.
What I actually have is some code where A and B are in packages
(different packages though).
Sun's 1.3 compiler is accepting it.
I'll submit a full bug report but where does the save-temps option
put it's generated files?
Nic


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /