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

JShell: Fails compilation: new Object().getClass().getSuperclass()

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 9
    • Fix Version/s: 9
    • Component/s: tools
    • Subcomponent:
    • Resolved In Build:
      b153
    • Verification:
      Verified

      Description

      jshell> new Object().getClass().getSuperclass()
      | Error:
      | illegal start of type
      | new Object().getClass().getSuperclass()
      | ^
      | Error:
      | <identifier> expected
      | new Object().getClass().getSuperclass()
      | ^
      | Error:
      | wrong number of type arguments; required 1
      | new Object().getClass().getSuperclass()
      | ^
      | Error:
      | cannot find symbol
      | symbol: class $1
      | new Object().getClass().getSuperclass()
      | ^
      | Error:
      | cannot find symbol
      | symbol: variable $1
      | new Object().getClass().getSuperclass()
      | ^


      —Dan

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated:
                Resolved: