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

[lworld] Allow an inline type to declare a superclass that meets specified restrictions

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • repo-valhalla
    • repo-valhalla
    • tools
    • generic
    • generic

      As of LW2, an inline class declaration may not have an extends clause (not even extends Object).

      Per http://cr.openjdk.java.net/~briangoetz/valhalla/sov/02-object-model.html, this is changing so that:

      Supertypes

      Inline classes can implement interfaces. They cannot extend arbitrary classes, but they can extend a limited category of abstract classes – those with no fields, empty no-arg constructor bodies, no other constructors, no instance initializers, no synchronized methods, and whose superclasses all meet this same set of conditions (Object and Number are examples of such classes.)

      We should allow this.

            sadayapalam Srikanth Adayapalam (Inactive)
            sadayapalam Srikanth Adayapalam (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: