[Bug java/12361] No error on illegal access to private inner class.

suckfish at ihug dot co dot nz gcc-bugzilla@gcc.gnu.org
Mon Sep 22 06:52:00 GMT 2003


PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12361



------- Additional Comments From suckfish at ihug dot co dot nz  2003-09-22 05:43 -------
Similarly, accessing a non-public class (e.g., A.Foo) from a class in a
different package (e.g., class B.Bar) does not give an error, but should.

/******** file Bar.java **********/
package B;
 
class Bar {
     
    A.Foo Basic()
    {
	return new A.Foo();
    }
 
}

/********** file Foo.java *********/
package A;

class Foo
{
}



More information about the Gcc-bugs mailing list