[lworld] TypeName.super.[TypeArguments] Identifier cannot occur in prologue

XMLWordPrintable

      In JLS,
      If the form is TypeName . super . [TypeArguments] Identifier, then:

      It is a compile-time error if the method invocation occurs in a static context or in an early construction context of the current class.

      But in JEP-401 EA2, the following code compiles:

      | Welcome to JShell -- Version 26-jep401ea2
      | For an introduction type: /help intro
      >....
         ...> class Test extends Super {
         ...>
         ...> Test() {}
         ...>
         ...> Test(int a) {
         ...> Test.super.testMethod();
         ...> super(); //it can be this or super, doesn’t matter
         ...> }
         ...> }
      | created class Super
      | created class Test

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

              Created:
              Updated: