Community
Participate
Working Groups
package p; interface I{ void k(); } class T{ void m(){ class X implements I{ public void k(){} }; X x= new X(); x.k(); /**/ } } search for references to I::K - none (wrong - /*1*/ is missing) search for declarations - 2 (ok) search for occurrences - 3 (ok) another case of occurrences != declarations + references
204
I cannot reproduce (neither in 204, nor in "204 + jdtcore205"). Can you?
Actually, I can reproduce if I put the test case in a file with a name which is not I (eg. AQ.java) Will investigate.
When initialiazing the method reference pattern, the lookup environment doesn't find p.I, thus it returns it could not initialize it and give up. Need to either be more tolerant (and report inaccurate matches) or parse the compilation unit first (which might be hard).
*** Bug 5069 has been marked as a duplicate of this bug. ***
*** Bug 5070 has been marked as a duplicate of this bug. ***
Now search for all compilation units that define the declaring type of the method, parse them, build their binding, and collect the super type names of the delaring types. Fixed in > 20011025
Added JavaSearchTest.testMethodReference1()