[kaffe] CVS kaffe (guilhem): Fixed class accessibility.

Ito Kazumitsu kaz at maczuka.gcd.org
Thu Dec 22 06:28:46 PST 2005


Hi Guilhem,

> I have met a new IllegalAccessError in eclipse. I have attached two 
> files which reproduce the problem.

legal2.java did not compile.

Found 1 semantic error compiling "legal2.java":

     7.                 legal1.A a = legal1.getA();
                               ^
*** Semantic Error: Type "legal1$A" was not found.

So I moved legal2.java to a/legal2.java and changed
"import a.*" to "package a". Is it OK?

Yes, running legal2 causes IllegalAccessError.

But after applying my patch, legal2 prints this:

$ kaffe -classpath . a.legal2
1

> The protected bit is difficult to handle apparently. I have talked with 
> Tom Tromey and it says that normally we should completely ignore the 
> accessibility flag in inner classes.

We may as well do so to make things simple.




More information about the kaffe mailing list