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

[lworld] Javac should not allow instantiation of V.ref or V.val

XMLWordPrintable

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

      https://cr.openjdk.java.net/~briangoetz/valhalla/sov/04-translation.html seems to call for support of

      new V.ref ()

      ("Instantiation of C$ref is translated as instantiation of a C$val followed by a cast to C$ref")

      Presently javac rejects this with the error that abstract classes cannot be instantiated.

      Should we support this at all? Even in the VBC migration case, constructors are not exposed so there should be no compatibility concerns.

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

              Created:
              Updated:
              Resolved: