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

Regression: Macro arguments names cannot collide with external references names

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0, 2.1
    • Fix Version/s: 2.2
    • Component/s: Engine
    • Labels:
      None

      Description

      Consider the following example:

      #macro( test $foo $bar )
        $foo $bar
      #end
      
      #set($foo = 'foo')
      #set($bar = 'bar')
      
      #test( $bar, $foo )
      

      The expected result would be "bar foo", but since 2.0 we get the incorrect result "bar bar", as if the first inner $foo macro argument was overwritting the second argument evaluation.

        Attachments

          Activity

            People

            • Assignee:
              cbrisson Claude Brisson
              Reporter:
              cbrisson Claude Brisson
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: