Bug 3330 - JCK 1.4 - illegal simple name imports (1GHW0G1)
Summary: JCK 1.4 - illegal simple name imports (1GHW0G1)
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.0   Edit
Hardware: All Windows NT
: P2 normal (vote)
Target Milestone: 2.0 M2   Edit
Assignee: Philipe Mulet CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-10-10 22:53 EDT by Philipe Mulet CLA
Modified: 2002-01-11 08:56 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 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