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

[lworld] Not all assignment of null to value instances should be rejected.

XMLWordPrintable

    • generic
    • generic

      Where statically discernible, at present javac disallows assignment of null reference to a value instance. In the L-World prototype, this behavior needs
      to change:

      (1) It is an error to assign the null reference to a static or instance field that has been declared to be ACC_FLATTENABLE
      (2) It is an error to update a field using withfield if the field has been declared to be ACC_FLATTENABLE
      (3) If the actual type of the components of an array is a value class type, it is illegal to assign null to an element

      At other places, null assignment to value instances is OK. (locals, parameters ... fields not tagged ACC_FLATTENABLE)


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

              Created:
              Updated:
              Resolved: