Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8236715

JShell: Records with errors are not properly corraled

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 14
    • Fix Version/s: 14
    • Component/s: tools
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b32

      Backports

        Description

        As reported here:
        https://mail.openjdk.java.net/pipermail/amber-dev/2019-December/005415.html

        Declaring a record which uses an undeclared variable does not work properly:
        ---
        jshell> record R(int i) { public int g() { return unknown; } }

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

        jshell>
        ---

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                jlahoda Jan Lahoda
                Reporter:
                jlahoda Jan Lahoda
                Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved: