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

odd set of errors in jshell with sealed classes

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Duplicate
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: tools
    • Labels:

      Description

      it is possible to define a sealed intf, and permitted subclass but can't be used

      jshell> sealed interface Foo permits X {
         ...> public int x();
         ...> }
      | created interface Foo, however, it cannot be referenced until class X is declaredjshell> class X implements Foo { public int x() { return 3; } }
      | created class X, however, it cannot be referenced until class Foo is declaredjshell> new X()
      | Error:
      | cannot find symbol
      | symbol: class X
      | new X()
      | ^

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                vromero Vicente Arturo Romero Zaldivar
                Reporter:
                vromero Vicente Arturo Romero Zaldivar
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: