odd set of errors in jshell with sealed classes

XMLWordPrintable

    • Type: Bug
    • Resolution: Duplicate
    • Priority: P3
    • None
    • Affects Version/s: None
    • Component/s: tools

      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()
      | ^

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

              Created:
              Updated:
              Resolved: