| Summary: | Classes with name with '$' and conflicting are not reported | ||
|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Jay Arthanareeswaran <jarthana> |
| Component: | Core | Assignee: | Jay Arthanareeswaran <jarthana> |
| Status: | VERIFIED WONTFIX | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | amj87.iitr, satyam.kandula |
| Version: | 3.7 | ||
| Target Milestone: | 3.8 M7 | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | |||
Even javac is confused here. It complains
class Name$ABC is public, should be declared in a file named Name$ABC.java
public class Name$ABC
^
1 error
Not sure what the error should be here, but it should not go away after cleaning. Jay, can you take a look (post 3.7)?
You have to put them in two separate java files. When I do that, javac is always consistent with the following error:
Name.java:3: duplicate class: Name.ABC
class ABC{}
^
1 error
(In reply to comment #2) > You have to put them in two separate java files. When I do that, javac is > always consistent with the following error: I also put them in 2 files, and I got the error in comment 1 (both java6 and 7). Javac isn't consistent across machines then ;) I think we get the desired error after cleaning since both the files get build together, but when you just change one file and save, the Name$ABC class file is overwritten by the new class file. While it would be ideal to have this fixed, I don't know how this can ever be fixed for reconciliation. Hence closing it, since things work for clean+build. I agree that we don't have to fix this. Verified for 3.8M7 |
Create two classes with following content into two different compilation units. package p; public class Name$ABC { class ABC {} } ---- package p; public class Name { class ABC{} } ----- The following error should be reported: "The type Name$ABC is already defined" but not. However, after a clean + build, the error appears. Modify (and save) either of the files, the error goes away.