RFR (14): JDK-8236715: Records with errors are not properly corraled

Jan Lahoda jan.lahoda at oracle.com
Wed Jan 8 16:25:20 UTC 2020


Consider a record that e.g.:

record R(int i) { public int g() { return unknown; } }

putting this into jshell (which was started with --enable-preview) will 
lead to no response and "R" won't be declared:
---
jshell>  record R(int i) { public int g() { return unknown; } }

jshell> new R(1)
|  Error:
|  cannot find symbol
|    symbol:   class R
|  new R(1)
|      ^
---

This is because the records are not properly corralled, and when 
corralled, the note to the user is not printed properly. The proposed 
patch strives to fix that.

Proposed change:
http://cr.openjdk.java.net/~jlahoda/8236715/webrev.00/

JBS: https://bugs.openjdk.java.net/browse/JDK-8236715

How does this look?

Thanks,
      Jan


More information about the kulla-dev mailing list