Bug 59306 - Class can not extend a class in a default package
Summary: Class can not extend a class in a default package
Status: RESOLVED INVALID
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows 2000
: P3 enhancement (vote)
Target Milestone: 3.0 M9   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-04-20 14:04 EDT by Ilya Rozenberg CLA
Modified: 2004-04-20 18:52 EDT (History)
0 users

See Also:


Attachments
Test case (992 bytes, application/octet-stream)
2004-04-20 16:27 EDT, Olivier Thomann CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ilya Rozenberg CLA 2004-04-20 14:04:26 EDT
I have in default package class called "ExtendClass"

public class ExtendClass {
}

In "mypkg" package I have class called "MyClass"
package mypkg;
import ExtendClass;
public class MyClass extends ExtendClass{
}

I get this in "Problems:
Severity	Description	Resource	In Folder	Location
	Creation Time
2	The import ExtendClass cannot be resolved	MyClass.java
	rtr/mypkg	line 8	April 20, 2004 1:58:30 PM
2	ExtendClass cannot be resolved or is not a valid superclass
	MyClass.java	rtr/mypkg	line 9	April 20, 2004 1:58:30 PM
Comment 1 Olivier Thomann CLA 2004-04-20 15:15:08 EDT
This is normal in 1.4 mode. It should work in 1.3. Import from the default
package is forbidden in 1.4.
See bug 45206.
Comment 2 Ilya Rozenberg CLA 2004-04-20 15:27:36 EDT
Some one depended on this to work. Why break it?
Comment 3 Ilya Rozenberg CLA 2004-04-20 15:32:05 EDT
I have changed the complience level for the project and it did not work anyway
Comment 4 Olivier Thomann CLA 2004-04-20 16:27:00 EDT
We didn't break anything. This was a bug in javac that has been fixed.
See http://developer.java.sun.com/developer/bugParade/bugs/4361575.html
Comment 5 Olivier Thomann CLA 2004-04-20 16:27:21 EDT
Created attachment 9729 [details]
Test case

The code assist doesn't work, but you can add the import to a class in the
default package when compliance is set to 1.3.
See attached test case.
Comment 6 Olivier Thomann CLA 2004-04-20 16:27:54 EDT
I would close as INVALID. Philippe, any comment?
Comment 7 Philipe Mulet CLA 2004-04-20 18:52:05 EDT
Closing indeed.