This is the mail archive of the
java-prs@sourceware.cygnus.com
mailing list for the Java project.
gcj/254: Cannot import inner classes
- To: java-gnats at sourceware dot cygnus dot com
- Subject: gcj/254: Cannot import inner classes
- From: mark at klomp dot org
- Date: 8 Jun 2000 20:17:53 -0000
- Reply-To: mark at klomp dot org
- Resent-Cc: java-prs at sourceware dot cygnus dot com, green at cygnus dot com
- Resent-Reply-To: java-gnats@sourceware.cygnus.com, mark@klomp.org
>Number: 254
>Category: gcj
>Synopsis: Cannot import inner classes
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: apbianco
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Jun 08 13:20:00 PDT 2000
>Closed-Date:
>Last-Modified:
>Originator: mark@klomp.org
>Release: gcc version 2.96 20000602 (experimental)
>Organization:
>Environment:
>Description:
It should be possible to import only an inner class
without importing the 'outer' class.
The following shows the problem:
=== p/A.java ===
package p;
import p.B.C;
public class A {
public static void main(String args[]) {
B.C bc = new B.C();
}
}
=== p/B.java ===
package p;
public class B {
public static class C {
}
}
=== Compiling with 'gcj p/*.java' ===
p/A.java:2: Class or interface `p.B.C' not found in import.
import p.B.C;
^
1 error
When replacing 'import p.B.C' with 'import p.B' the files
do compile correctly.
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted: