Bug 5809

Summary: Duplicate class names in separate package imports cause compile error
Product: [Eclipse Project] JDT Reporter: John R. Hicks <angryjohn69>
Component: CoreAssignee: Philipe Mulet <philippe_mulet>
Status: RESOLVED WONTFIX QA Contact:
Severity: normal    
Priority: P3    
Version: 2.0   
Target Milestone: 2.0 M4   
Hardware: PC   
OS: Windows 2000   
Whiteboard:

Description John R. Hicks CLA 2001-11-12 14:36:14 EST
importing two classes with the same name, but in different packages causes a 
compilation error stating that the classes are ambiguous.  As long as fully 
qualified pathnames are being used when variables are declared, this should not 
be an error.  Sample code follows:

...
import java.sql.Date;
import java.util.Date;
...
java.util.Date date = new java.util.Date(...);
...
java.sql.Date sqlDate = rs.getDate(1);
...
Comment 1 Philipe Mulet CLA 2001-11-13 16:52:43 EST
The error should be reduced to a warning, and we should ignore conflicting imports from there on.
Comment 2 David Audel CLA 2002-01-11 11:48:18 EST
Fixed
Comment 3 Philipe Mulet CLA 2002-01-11 12:52:59 EST
Taking the fix off, actually we have to complain.
I don't understand why I got convinced the other way around, but our old 
behavior was the right one. Note: I don't see us complaining about an 
ambiguity, just collision in import.
Comment 4 Philipe Mulet CLA 2002-02-26 05:47:22 EST
Closing, we do behave like javac.