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

Regression: Macro arguments names cannot collide with external references names

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.0, 2.1
    • 2.2
    • Engine
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: