[leftover] Using _ as a variable
Remi Forax
forax at univ-mlv.fr
Sat Apr 15 09:41:36 UTC 2017
Many thanks.
Rémi
On April 14, 2017 9:09:50 PM GMT+02:00, Vicente Romero <vicente.romero at oracle.com> wrote:
>Hi Remi,
>
>Thanks for the report. I have updated the error message,
>
>Merci,
>Vicente
>
>On 04/14/2017 02:38 PM, Brian Goetz wrote:
>> Great catch, thanks!
>>
>> On 4/14/2017 2:37 PM, Remi Forax wrote:
>>> If someone try to use '_' as a variable, javac reports the following
>
>>> error,
>>> which is not very readable.
>>>
>>> javac -source 10 LambdaLeftovers.java
>>> LambdaLeftovers.java:10: error: as of release 10, '_' may only be
>>> used as an identifier of:
>>> System.out.println(_);
>>> ^
>>> unused lambda, method, or catch formal parameter.
>>> 1 error
>>>
>>> what about
>>> as of release 10, '_' can only be used as an unused formal
>parameter.
>>>
>>> cheers,
>>> Rémi
>>>
>>
--
Sent from my Android device with K-9 Mail. Please excuse my brevity.
More information about the amber-dev
mailing list