This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
I can have 2 classes with the same name inside a package as long as one class or both classes are an outer class within a separate class.. for example: File 1: test.java -------------------------- package p1; public class test{} class otherClass{} --------------------------- File 2: otherClass.java --------------------------- package p1; public class otherClass{} --------------------------- This should be an error " 'otherClass' already defined in package p1" But it does not give that error (unless i clean&build) Unfortunately, i am able to "run" the code in Netbeans without any errors/warnings at all, and any usage of "otherClass" in some other class in package "p1" simply uses the class that was most recently used.
Fixed in jet-main. http://hg.netbeans.org/jet-main/rev/8af0f812fa21 changeset d0a03aa040b9 in main/nb-javac details: http://hg.netbeans.org/main/nb-javac?cmd=changeset;node=d0a03aa040b9
Integrated into 'main-golden', will be available in build *201007210001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/8af0f812fa21 User: Dusan Balek <dbalek@netbeans.org> Log: Issue #187343: uncought duplicate class error - fixed.
*** Bug 190698 has been marked as a duplicate of this bug. ***