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

odd set of errors in jshell with sealed classes

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • P3
    • None
    • None
    • tools

    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

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

              Dates

                Created:
                Updated:
                Resolved: