Summary: | [code assist] METHOD_REF proposals have non-standard signatures | ||
---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Tom Hofmann <eclipse> |
Component: | Core | Assignee: | David Audel <david_audel> |
Status: | VERIFIED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | P3 | CC: | david_audel, philippe_mulet |
Version: | 3.1 | ||
Target Milestone: | 3.1 M5 | ||
Hardware: | PC | ||
OS: | Linux-GTK | ||
Whiteboard: |
Description
Tom Hofmann
2005-01-25 06:56:45 EST
++ and +* definitely look wrong. However, first level wildcards are possible in method invocations (not in method declarations), due to substitution of variables. Signature should honour these. The signature is computed from a binding and the binding seems incorrect: 'boolean addAll(Collection<? extends ? extends java.lang.Number>)' for the first test case. This method binding come from ParameterizedTypeBinding#avaibleMethods() and the type binding seems correct: 'public interface List<? extends java.lang.Number>'. The problem could be inside substitution when building parameterized method. My previous comment is wrong. 'boolean addAll(Collection<? extends ? extends java.lang.Number>)' is a valid binding. The receiver type is List<? extends java.lang.Number>, so the type argument E of List<E> is '? extends java.lang.Number'. The generic method is addAll(Collection<? extends E>), so the parameterized method is addAll(Collection<? extends ? extends Number>). *** Bug 84658 has been marked as a duplicate of this bug. *** signature with multiple levels of wildcards can exist after subsitution of variable. Fixed and test updated SignatureTests#testGetParamaterCount() signature with ++, +-, +* are now considered as valid signature by Signature. Verified in I20050214 |