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

Reply via email to