RFR: 8309235: Unnamed Variables (_) can't be used in JShell [v2]

Adam Sotona asotona at openjdk.org
Wed Jun 7 17:44:46 UTC 2023


On Tue, 6 Jun 2023 15:33:14 GMT, Aggelos Biboudis <abimpoudis at openjdk.org> wrote:

>> This PR addresses the issue of JShell not accepting unnamed local variables. This solution prints all local variables via the `/vars` command. e.g.,
>> 
>> 
>> jshell> int _ = 42;
>>  ==> 42
>> 
>> jshell> int _ = 43;
>>  ==> 43
>> 
>> jshell> String _ = "44";
>>  ==> "44"
>> 
>> jshell> /vars
>> |    int _ = 42
>> |    int _ = 43
>> |    String _ = "44"
>
> Aggelos Biboudis has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Fix NPE

Looks good 👍

-------------

Marked as reviewed by asotona (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/14337#pullrequestreview-1468252642


More information about the kulla-dev mailing list