This is the mail archive of the java-prs@sourceware.cygnus.com mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

gcj/254: Cannot import inner classes



>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:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]