Community
Participate
Working Groups
Build 3.3M2 The following code should compile clean: public class X { static <T> T foo() { return null; } public static void main(String[] args) { String[] s = { foo() }; } } Currently, we do not set expected type for array initializer, and thus cannot conduct proper inference on type expectation for generic invocation of #foo().
Added GenericTypeTest#test1056
Created attachment 52746 [details] Proposed patch
*** Bug 159987 has been marked as a duplicate of this bug. ***
Released for 3.3M3 (HEAD) Backporting to 3.2.2 since bug 159987 demonstrates code corruption if applying cleanup action.
Released for 3.2.2
Verified for 3.3 M3 using build I20061030-0010
verified for 3.2.2 using build M20070112-1200