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

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

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 9
    • 9
    • tools
    • b153
    • Verified

      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

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

              Created:
              Updated:
              Resolved: