Bug 81782 - 3.1M4 default package import broken, compilation broken
Summary: 3.1M4 default package import broken, compilation broken
Status: RESOLVED DUPLICATE of bug 80218
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.1 M4   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-12-22 08:59 EST by mike andrews CLA
Modified: 2004-12-22 09:41 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description mike andrews CLA 2004-12-22 08:59:22 EST
here follow two classes: ClassA in default package, and ClassB in package test.a:


public class ClassA {

}

package test.a;

public class ClassB {
    public void test() {
        System.out.println(ClassA.class);
    }
}


the compiler will intially throw an error for the System.out.println line, which
i believe it shouldn't --- since ClassA is in default package.

then, to make matters worse, if one 'organizes imports' in ClassB by typing
ctrl-chift-o, the compiler does the following and then throws two errors
(another one for the added import):

package test.a;

import ClassA;

public class ClassB {
    public void test() {
        System.out.println(ClassA.class);
    }
}

thus, it seems impossible to use classes in the default package with 3.1M4 (not
that i'd want to, anyway :-)
Comment 1 mike andrews CLA 2004-12-22 09:00:06 EST
note: ClassA and classB are each in their own separate file, as usual.
Comment 2 Frederic Fusier CLA 2004-12-22 09:41:01 EST

*** This bug has been marked as a duplicate of 80218 ***