Confusing javac error :)

Maurizio Cimadamore maurizio.cimadamore at oracle.com
Fri Nov 30 05:01:31 PST 2012


On 30/11/12 12:52, Remi Forax wrote:
> On 11/30/2012 01:21 PM, Maurizio Cimadamore wrote:
>> On 30/11/12 12:08, Peter Levart wrote:
>>> On 11/30/2012 11:45 AM, Remi Forax wrote:
>>>> On 11/30/2012 11:30 AM, Remi Forax wrote:
>>>>> On 11/30/2012 11:06 AM, David Holmes wrote:
>>>>>> On 30/11/2012 5:15 PM, Remi Forax wrote:
>>>>>>> Yes, the default version should be 8.
>>>>>> ?? I specified:
>>>>>>
>>>>>> -source 8
>>>>>>
>>>>>> ;-) Hence the confusion regarding the error.
>>>>>>
>>>>>> David
>>>>> doh, I see really weird.
>>>>>
>>>>> Rémi
>>>> Ok, got it,
>>>> The version of the compiler shipped with b65 has lambda disabled 
>>>> with a
>>>> non standard flag
>>>>      /usr/jdk/jdk1.8.0/bin/javac -XDallowLambda Test.java
>>>>
>>>> changeset 01c9d4161882 enable lambda by default:
>>>> http://hg.openjdk.java.net/jdk8/jdk8/langtools/diff/01c9d4161882/src/share/classes/com/sun/tools/javac/parser/JavacParser.java 
>>>>
>>>> so b66 will have lambda enabled by default.
>>>>
>>>> Rémi
>>> Hi Remi,
>>>
>>> Do you happen to know the switch for default methods too?
>>>
>>> java: default methods are not supported in -source 1.8
>>>     (use -source 8 or higher to enable default methods)
>>>
>>> Regards, Peter
>> Please do not rely on those internal flags. There's a reason why 
>> lambda/default methods are not enabled by default in b65 - first and 
>> foremost because hotspot and JDK changes are not there yet. Let's all 
>> wait for next promotion, or use the lambda repo, shall we? ;-)
>
> so I will not answer to Peter that he can just follow the link of the 
> changeset above which show the name of the switch.
If you like to play to unstable bits go ahead ;-)

Maurizio
>
>>
>> Maurizio
>
> Rémi
>



More information about the lambda-dev mailing list