Summary: | Unidentical ITypeBindings for same type from same AST from reconcile | ||
---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Markus Keller <markus.kell.r> |
Component: | Core | Assignee: | Jerome Lanneluc <jerome_lanneluc> |
Status: | VERIFIED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | P3 | CC: | Olivier_Thomann |
Version: | 3.1 | ||
Target Milestone: | 3.1 M5 | ||
Hardware: | PC | ||
OS: | Windows XP | ||
Whiteboard: |
Description
Markus Keller
2005-01-19 12:28:50 EST
This problem seems to come from the reconciler only. It works fine. I would say that as long as the isEqualsTo(...) and the getKey() returns true, it is not too bad. You should never based your code on identity. Olivier> You should never based your code on identity. That's not true. The spec of IBinding#equals(Object) clearly states that equal bindings from the same cluster are identical. Up to now, we were always told to use == for performance reasons. However, I just found this inconsistency, but I'm not aware of anything that is currently broken because of this. Markus, you are right. I spoke too fast. I should have added in diferrent clusters. Indeed within the same cluster, the binding should be identical. The problem occurs only using the reconciler. It works fine if you create a DOM/AST for the test case. When using ICompilationUnit#reconcile(...) the lookup environment was reset. Since the bindings for imports are lazy initialized, a new one was created. Fixed CompilationUnitProblemFinder#process(...) to reset the environment only if no AST was requested. Added regression test ASTConverterTest2#test0570(). Verified in I20050214-0927 |