Bug 3330

Summary: JCK 1.4 - illegal simple name imports (1GHW0G1)
Product: [Eclipse Project] JDT Reporter: Philipe Mulet <philippe_mulet>
Component: CoreAssignee: Philipe Mulet <philippe_mulet>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P2    
Version: 2.0   
Target Milestone: 2.0 M2   
Hardware: All   
OS: Windows NT   
Whiteboard:

Description Philipe Mulet CLA 2001-10-10 22:53:20 EDT
When moving to 1.4 (http://java.sun.com/j2se/1.4/compatibility.html)

The compiler now rejects import statements that import a type from the unnamed 
namespace. Previous versions of the compiler would accept such import
          declarations, even though they were arguably not allowed by the 
language (because the type name appearing in the import clause is not in 
scope). The
          specification is being clarified to state clearly that you cannot 
have a simple name in an import statement, nor can you import from the unnamed 
namespace. 

          To summarize, the syntax 

               import SimpleName;

          is no longer legal. Nor is the syntax 

               import ClassInUnnamedNamespace.Nested;

          which would import a nested class from the unnamed namespace. To fix 
such problems in your code, move all of the classes from the unnamed namespace 
into a
          named namespace. 

NOTES:

OT (9/14/2001 1:54:59 PM)
	See http://developer.java.sun.com/developer/bugParade/bugs/4361575.html
OT (14/09/2001 5:26:26 PM)
	JCKs tests related to this problem:
		lang/NAME/name072/name07201/name07201.html: name07201 - 
importing of unnamed package class 
	    lang/NAME/name072/name07202/name07202.html: name07202 - mporting of 
unnamed package interface 
	    lang/PKGS/pkgs010/pkgs01002/pkgs01002.html: pkgs01002 - unnamed and 
named package compilation units
Comment 1 DJ Houghton CLA 2001-10-29 17:10:03 EST
PRODUCT VERSION:
0.9

Comment 2 Philipe Mulet CLA 2001-12-19 09:13:17 EST
Will now refuse to resolve such imports once in 1.4 compliant mode.
Fixed