javac failure
Joe Darcy
joe.darcy at oracle.com
Fri Oct 22 17:32:20 PDT 2010
Following up, Jon and Maurizio, do you see an issue with backporting
these two patches to OpenJDK b21?
Thanks,
-Joe
Jonathan Gibbons wrote:
> cc: compiler-dev
>
> -- Jon
>
>
>
> On 09/10/2010 09:58 AM, Dr Andrew John Hughes wrote:
>> When running the attached test case (thanks to Deepak Bhole) through
>> javac, we found it fails with:
>>
>> Test.java:14: incompatible types; inferred type argument(s)
>> java.lang.Object do not conform to bounds of type variable(s) T
>> found :<T>java.util.ArrayList<java.lang.String>
>> required: java.util.ArrayList<java.lang.String>
>> ArrayList<String> l = test(new ArrayList<String>());
>> ^
>> 1 error
>>
>> On both the proprietary Oracle JDK and OpenJDK7, this file compiles.
>>
>> By backporting the following changesets:
>>
>> changeset: 298:22872b24d38c
>> user: mcimadamore
>> date: Tue Jun 16 10:46:37 2009 +0100
>> summary: 6638712: Inference with wildcard types causes selection
>> of inapplicable method
>>
>> changeset: 395:dda7e13f09fb
>> user: mcimadamore
>> date: Tue Sep 01 14:53:39 2009 +0100
>> summary: 6650759: Inference of formal type parameter (unused in
>> formal parameters) is not performed
>>
>> (6650759 is dependent on the changes in 6638712)
>>
>> we managed to get the file to compile.
>>
>> A webrev of 6638712 is available at:
>>
>> http://cr.openjdk.java.net/~andrew/6638712/webrev.01/
>>
>> and 6650759 will follow if appropriate.
>>
>> The following minor changes had to be made to 6638712 to work with
>> current OpenJDK javac:
>>
>> * The use of Types.createErrorType was replaced with Types.errType as
>> in other cases in that file.
>> This avoids the need to backport:
>>
>> changeset: 109:91eea580fbe9
>> parent: 106:5a9b808557b6
>> user: jjg
>> date: Tue Sep 09 10:28:21 2008 -0700
>> summary: 6557752: Original type of an AST should be made
>> available even if it is replaced with an ErrorType
>>
>> but that can be done too if necessary.
>>
>> * The final variable invalidInstanceException was initialised.
>> * The test case output was changed to match that output by patched
>> OpenJDK6 (which is similar but not identical).
>> * The test case code files were updated as in:
>>
>> changeset: 383:ed31953ca025
>> user: jjg
>> date: Thu Aug 27 11:08:27 2009 -0700
>> summary: 6875336: some tests should use /nodynamiccopyright/
>>
>> so as to avoid introducing Sun copyright headers.
>>
>> Ok to push this backport to OpenJDK6? Or do you have a simpler
>> solution for fixing this issue?
>>
>> Thanks,
>>
>
More information about the compiler-dev
mailing list