Uploaded image for project: 'Commons JEXL'
  1. Commons JEXL
  2. JEXL-300

Ant-ish variables should not use safe-access operator syntax

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.1
    • 3.2
    • None

    Description

      The following code

      a?.x = 1; a.x

      returns 1 and creates ant-ish variable a.x in the evaluation context. The expected behaviour is to fail with assignment error because there is no a variable. As an alternative approach we can restrict safe-access operator at the left side of assignment at all, since there is no much sense in assigning anything to what can be null.

      Attachments

        Activity

          People

            henrib Henri Biestro
            dmitri_blinov Dmitri Blinov
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: