Community
Participate
Working Groups
20051209 1. create an AST of the following example package pack1; public class E<X> { public static <T> E<T> bar(T t) { return null; } public void foo(E<?> e) { bar(e); } } 2. look at the type binding of 'bar(e)'. It is E<E<capture-of-?>>. 3. use String signature= new BindingKey(binding.getKey()).internalToSignature(); -> signature is Lpack1.E<Lpack1.E<*>;>; should probably be Lpack1.E<Lpack1.E<!*>;>;
Reproduce with HEAD using toSignature() instead of internalToSignature().
The key used for toSignature() is Lpack1/E<Lpack1/E<!Lpack1/E;*122;>;>;.
Created attachment 51732 [details] Proposed fix
Created attachment 51733 [details] Regression tests
Jerome, If the '!' is expected, then we have some boggus regression tests. See the attached patch for the regression tests. Please review the patch. Thanks.
Need to think more about it. Deferring post 3.4
Created attachment 104181 [details] Same fix and updated tests Fix was correct. My confusion came from the existing BindingKeyTests for wildcard and capture that used an impossible to get binding key. The patch fixes those tests and it adds new test for Signature#toString(...) for captures.
Fix and tests released for 3.5M1
Verified for 3.5M1 using I20080805-1307