Summary: | [compiler] Doesn't report cycle inheritance problem which is detected by Oracle JDK | ||||||
---|---|---|---|---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | leokom leokom <lrozenblyum> | ||||
Component: | Core | Assignee: | JDT-Core-Inbox <jdt-core-inbox> | ||||
Status: | RESOLVED FIXED | QA Contact: | |||||
Severity: | normal | ||||||
Priority: | P3 | CC: | jmhenaff, manoj.palat, stephan.herrmann, sxenos | ||||
Version: | 4.5.1 | Keywords: | helpwanted | ||||
Target Milestone: | --- | ||||||
Hardware: | PC | ||||||
OS: | Windows 7 | ||||||
Whiteboard: | stalebug | ||||||
Attachments: |
|
Description
leokom leokom
2016-01-13 11:19:53 EST
Created attachment 263457 [details]
File with no cycle detected by ecj
Reproduced on Linux with latest integration and nightly build (N20160730). I've attached source files to reproduce the case. Note that removing the imports make the compilation fail. Well, the example in comment 0 is rejected by all versions of ecj. This is in line with javac's behavior and the accepted answer on SO. The attached project, OTOH, uses imports and simple type references, and hence I don't see X mentioned in its hierarchy. => This program does not violate JLS as quoted in the SO answer. However, the corresponding JLS section has since been changed from as a qualifier of a superclass or superinterface name to as a qualifier in the fully qualified form of a superclass or superinterface name This change was effective as of Java 7 and should be adopted by ecj. Also javac 6 accepts the attached example, demonstrating that this was an intented change. bulk move out of 4.8 Bulk move out of 4.9 This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie. This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie. Works fine now: in Eclipse 2022-12 and 2024-03 with JDK17 we have such compilation errors in Eclipse, which correlates with Oracle javac. The hierarchy of the type First is inconsistent The hierarchy of the type Second is inconsistent Cycle detected: a cycle exists in the type hierarchy between Second and First |