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

Variable redeclaration option

    XMLWordPrintableJSON

    Details

    • Type: New Feature
    • Status: Reopened
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.1
    • Fix Version/s: 3.2
    • Labels:
      None

      Description

      As of now, JEXL allows a script writer to redeclare a local variable during script evaluation.

      var a = 1; var a = 2;

      This may lead to potential errors with misspelled names and clashed variables. Checking for already defined variable is a common feature of many languages. This feature can be implemented in JEXL as an additional option of JexlFeatures class, enabled by default, thus allowing compatibility with existing code.

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated: