Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8236300 | 15 | Jan Lahoda | P3 | Resolved | Fixed | team |
See this jshell session:
---
$ jshell -C--enable-preview -C-source -C14 -R--enable-preview
| Welcome to JShell -- Version 14-internal
| For an introduction type: /help intro
jshell> record R(int i) {
| Error:
| reached end of file while parsing
| record R(int i) {
| ^
jshell> record R(int i) {}
jshell> new R(1)
| Error:
| cannot find symbol
| symbol: class R
| new R(1)
| ^
---
Several issues are visible here:
-the completeness analysis fails to recognize "record R(int i) {" to be incomplete
-when a complete record is provided, it cannot be instantiated
---
$ jshell -C--enable-preview -C-source -C14 -R--enable-preview
| Welcome to JShell -- Version 14-internal
| For an introduction type: /help intro
jshell> record R(int i) {
| Error:
| reached end of file while parsing
| record R(int i) {
| ^
jshell> record R(int i) {}
jshell> new R(1)
| Error:
| cannot find symbol
| symbol: class R
| new R(1)
| ^
---
Several issues are visible here:
-the completeness analysis fails to recognize "record R(int i) {" to be incomplete
-when a complete record is provided, it cannot be instantiated
- backported by
-
JDK-8236300 JShell does not handle records properly
-
- Resolved
-
- blocks
-
JDK-8235338 test jdk/jshell/CompletenessTest.java fails for records
-
- Resolved
-
- csr for
-
JDK-8235476 JShell does not handle records properly
-
- Closed
-