[Bug java/26617] New: A class from an unnamed package is visible to classes in named packages
rmathew at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Thu Mar 9 10:14:00 GMT 2006
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
More information about the Gcc-bugs
mailing list