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

JShell does not handle -source 8 properly

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 17
    • 17
    • tools
    • None
    • b06

      Running JShell with -source 8 (-C-source -C8), only the first snippet is evaluated:
      ---
      $ jshell -C-source -C8
      | Welcome to JShell -- Version 17-internal
      | For an introduction type: /help intro

      jshell> 1+1
      $1 ==> 2

      jshell> 1+2
      | Error:
      | cannot find symbol
      | symbol: class
      | 1+2
      | ^
      | Error:
      | static import only from classes and interfaces
      | 1+2
      | ^

      ---

            jlahoda Jan Lahoda
            jlahoda Jan Lahoda
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: