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

JShell: corralling not restored on drop

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 13
    • 10
    • tools
    • None
    • b24

        jshell> /rel -res
        | Restarting and restoring from previous state.
        -: void p() throws Exception { ((String) null).toString(); }
        -: void n() throws Exception { try { p(); } catch (Exception ex) { throw new IOException("bar", ex); }}
        -: void m() { try { n(); } catch (Exception ex) { throw new RuntimeException("foo", ex); }}
        -: void c() throws Throwable { p(); }
        -: /drop p
        -: c()

        jshell> m()
        | Error:
        | cannot find symbol
        | symbol: method m()
        | m()
        | ^

        jshell> /met
        | void n()
        | which cannot be referenced until method p() is declared
        | void m()
        | which cannot be referenced until method n() is declared
        | void c()
        | which cannot be invoked until method p() is declared

              rfield Robert Field (Inactive)
              rfield Robert Field (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: