[prev in list] [next in list] [prev in thread] [next in thread]
List: openjdk-lambda-dev
Subject: RE: javac 8 with target level 7
From: "Anna Kozlova" <anna.kozlova () jetbrains ! com>
Date: 2014-01-22 18:53:54
Message-ID: 02ad01cf17a3$4caae510$e600af30$ () jetbrains ! com
[Download RAW message or body]
Thanks Vicente!
For us this bug means that we should not use jdk 8 until we switch to java 8
as a language because we can break the compilation for others who still use
jdk 6 without noticing that locally (We still are forced to use java 6
language due to problems with jdk 7 on Mac).
Thanks,
Anna
-----Original Message-----
From: Vicente-Arturo Romero-Zaldivar [mailto:vicente.romero@oracle.com]
Sent: Monday, January 20, 2014 5:45 PM
To: Gernot Neppert; Anna Kozlova
Cc: lambda-dev@openjdk.java.net
Subject: Re: javac 8 with target level 7
Thanks Anna for the report. I think that this issue should be studied
carefully so I have created this bug entry to track it:
https://bugs.openjdk.java.net/browse/JDK-8032268
Vicente
On 22/12/13 11:41, Gernot Neppert wrote:
> Hi,
>
> I think the option "-target 7" mandates that the generated
> *classfiles* be compatible with a Java-7 VM.
> The option "-source 7" would mandate that the compiler accept all
> sources that were valid Java-7 sources.
> However, there is no option that would force a newer compiler to
> *reject* the same set of sources that was rejected in an earlier version.
> (The reason is, of course, that making previously invalid sources
> compilable certainly does not break any promises of compatibility.)
>
> Does that make sense?
>
>> Hi,
>>
>> The code compiles with java 8 (b. 119) target 7, but fails to compile
>> with javac 7 target 7:
>>
>> import java.util.Comparator;
>>
>> class GenericMethod {
>> <E extends Comparable<E>> Comparator<E> getComparator() {
>> return null;
>> }
>>
>> <E> void useComparator(Comparator<? super E> comparator) {
>> }
>>
>> void test() {
>> useComparator(this.getComparator());
>> }
>> }
>>
>> Was that intended?
>>
>> Thanks,
>> Anna
>>
>>
>
!DSPAM:35,52dd52ac149372051017194!
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic