[lworld] `super` should be rejected in early construction context

XMLWordPrintable

      In JLS,
       It is a compile-time error if a field access expression using the keyword super occurs in a static context (8.1.3) or in an early construction context (8.8.7) of the current class.

      However, with the JEP 401 EA2, the following code compiles.

      interface Parent {
           boolean check = true;
      }

      class Medium implements Parent {}

      class Test extends Medium {
          Test() {}

          Test(int a) {
              boolean check = super.check;
              super();
          }
      }

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

              Created:
              Updated: