Summary: | Method reference with member type parameter(s) not found | ||
---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Knut Radloff <knut_radloff> |
Component: | Core | Assignee: | Frederic Fusier <frederic_fusier> |
Status: | VERIFIED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | P3 | ||
Version: | 3.0 | ||
Target Milestone: | 3.1 M2 | ||
Hardware: | PC | ||
OS: | Windows 2000 | ||
Whiteboard: |
Description
Knut Radloff
2003-07-31 11:46:32 EDT
Finding the results is JDT Core. This works for me using the following cu: public class A { protected Object anotherMethod(ClassA var, ClassB arg1) { if (true) { var.m1( arg1, methodA( arg1, ((ClassB.InnerClass) arg1).m1(), null), false); return arg1.m2(); } return null; } Object methodA(ClassB arg1, Object arg2, Object arg3) { return null; } } class ClassA { void m1(ClassB arg1, Object arg2, boolean arg3) { } } class ClassB { class InnerClass extends ClassB { } Object m1() { return null; } Object m2() { return null; } } Do you have more details? The key is that the last argument to methodA is of type ClassB.InnerInterface. Where ClassB implements Interface and interface Interface { interface InnnerInterface {}} Here's a simplified snippet that demonstrates the problem: public class A { protected void anotherMethod() { methodA(null); } private Object methodA(ClassB.InnerInterface arg3) { return null; } } class ClassB implements InterfaceB { } interface InterfaceB { interface InnerInterface { } } Confirmed. Workaround is to define methodA as follows: private Object methodA(InterfaceB.InnerInterface arg3) { return null; } Fixed and released in HEAD. Search now find method reference in this peculiar case. [jdt-core-internal] Changes done in MethodLocator.matchMethod(MethodBinding) Test case added in JavaSearchTests Verified in I200409230100. |