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

Aggelos Biboudis abimpoudis at openjdk.org
Tue Jun 6 15:33:14 UTC 2023


> 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

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/14337/files
  - new: https://git.openjdk.org/jdk/pull/14337/files/2e44300a..953b5846

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=14337&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=14337&range=00-01

  Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod
  Patch: https://git.openjdk.org/jdk/pull/14337.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/14337/head:pull/14337

PR: https://git.openjdk.org/jdk/pull/14337


More information about the kulla-dev mailing list