This is the mail archive of the
java-prs@gcc.gnu.org
mailing list for the Java project.
[Bug java/26617] New: A class from an unnamed package is visible to classes in named packages
- From: "rmathew at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: java-prs at gcc dot gnu dot org
- Date: 9 Mar 2006 10:14:45 -0000
- Subject: [Bug java/26617] New: A class from an unnamed package is visible to classes in named packages
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
GCJ allows classes in named packages to see classes in unnamed packages.
For example:
---- ./Snafu.java ----
public class Snafu { }
----------------------
---- ./foo/Bar.java ----
package foo;
// import Snafu;
public class Bar
{
Snafu junk;
}
------------------------
Note that GCJ accepts the code in "foo/Bar.java" with
or without the line commenting out the import declaration.
Both Jikes 1.22 and Sun's JDK 1.5.0_05 reject this
code.
--
Summary: A class from an unnamed package is visible to classes in
named packages
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: java
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: rmathew at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26617