Community
Participate
Working Groups
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); ...
The error should be reduced to a warning, and we should ignore conflicting imports from there on.
Fixed
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.
Closing, we do behave like javac.