Bug report with lworld / jshell
Srikanth
srikanth.adayapalam at oracle.com
Mon Jul 8 05:28:19 UTC 2019
Thanks Brian, I will follow up.
Srikanth
On 05/07/19 9:54 PM, Brian Goetz wrote:
> In JShell, I did the following:
>
> jshell -C-XDallowGenericsOverValues
> | Welcome to JShell -- Version 14-internal
> | For an introduction type: /help intro
>
> jshell> inline class V { int x; int y; V(int x, int y) { this.x = x;
> this.y = y; } }
> | Warning:
> | Modifier 'final' not permitted in top-level declarations, ignored
> | inline class V { int x; int y; V(int x, int y) { this.x = x; this.y
> = y; } }
> |
> ^--------------------------------------------------------------------------^
> | created class V
>
> // The warning is confusing, but not terrible.
>
> jshell> V v = new V(1,2)
> v ==> [V x=1 y=2]
>
> jshell> V? vv = v
> vv ==> [V x=1 y=2]
>
> jshell> v
> v ==> [V x=1 y=2]
>
> jshell> vv
> | Exception java.lang.NoSuchFieldError: vv
> | at (#5:1)
>
> The last seems a JShell bug.
>
>
More information about the valhalla-dev
mailing list