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

JShell: variable declaration with unicode type name gets garbled result

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 15
    • Fix Version/s: 16
    • Component/s: tools
    • Labels:
      None
    • Subcomponent:
    • Resolved In Build:
      b08
    • CPU:
      generic
    • OS:
      generic

      Description

      jshell> class \u00AA {}
      | created class \u00AA

      jshell> \u00AA x
      | created variable x, however, it cannot be referenced until class A is declared

      --------------

      Inspection determines that the source range is accessed from the compiler API, and that it gives a start position of 5 and end position of 6.

      It will need to be determined if this is a compiler bug or intended behavior. If the later, than a different mechanism will need to be used.

      ------------
      Note: There are no issues with method, classes, and expressions...

      jshell> \u00AA m() { return null;}
      | created method m()

      jshell> class C extends \u00AA {}
      | created class C

      jshell> new \u00AA()
      $9 ==> ?@1d56ce6a

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              rfield Robert Field
              Reporter:
              rfield Robert Field
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: