Uploaded image for project: 'Velocity'
  1. Velocity
  2. VELOCITY-681

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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 1.6.1
    • 1.6.2
    • Engine
    • 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).

      Attachments

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

        Issue Links

          Activity

            People

              Unassigned Unassigned
              sdumitriu Sergiu Dumitriu
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: