Summary: | Spurious 'cycle detected'/'hierarchy inconsistent' errors if a type that WOULD be cyclic is static-imported | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Ben Davis <entheh> | ||||||
Component: | Core | Assignee: | Srikanth Sankaran <srikanth_sankaran> | ||||||
Status: | VERIFIED FIXED | QA Contact: | |||||||
Severity: | normal | ||||||||
Priority: | P3 | CC: | amj87.iitr, entheh, Olivier_Thomann, stephan.herrmann | ||||||
Version: | 3.6 | ||||||||
Target Milestone: | 3.7 M1 | ||||||||
Hardware: | PC | ||||||||
OS: | Windows Vista | ||||||||
Whiteboard: | |||||||||
Attachments: |
|
Description
Ben Davis
2010-07-14 13:12:06 EDT
A thought: Eclipse seems to compile in reverse alphabetical order for me. It's probably trying to resolve GreenBox.Cat first. In order to resolve the 'extends' clause, it has to resolve the static imports. While doing that, it finds BrownBox.BlackCat, and sees that it extends GreenBox.Cat - a type it is already trying to resolve. Hence it generates a 'cycle' error. Hope that helps! Reproduced with 3.6. I'll investigate. Created attachment 174598 [details]
Patch under consideration.
I discussed this with Ayush and we agreed that I'll fix
this and he will review the patch.
Comment on attachment 174598 [details]
Patch under consideration.
This patch is the result of muddled thinking. Will need rework.
Created attachment 174702 [details]
Patch under test
All tests pass, Ayush, please review, TIA. (In reply to comment #6) > All tests pass, Ayush, please review, TIA. Looks good. Released in HEAD for 3.7 M1 Verified for 3.7M1. |