Velocity
  1. Velocity
  2. VELOCITY-681

[regression] Changes on the macro parameters are not persisted outside the macro call

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 1.6.1
    • Fix Version/s: 1.6.2
    • Component/s: Engine
    • Labels:
      None

      Description

      The fix for VELOCITY-615 was too radical, since it completely disables #setting new values to the formal arguments. A minimalistic example that used to work up to 1.6 (but not with 1.6.1) is:

      
      

      #macro(myMacro $result)
      #set($result = 'some value')
      #end
      #myMacro($x)
      $x

      {/noformat}

      which prints $x (as an undefined variable).

      1. VELOCITY-681-trunk.patch
        16 kB
        Sergiu Dumitriu
      2. VELOCITY-681-1.6.patch
        15 kB
        Sergiu Dumitriu

        Issue Links

          Activity

          No work has yet been logged on this issue.

            People

            • Assignee:
              Unassigned
              Reporter:
              Sergiu Dumitriu
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development