You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by "Thomas Mortagne (Jira)" <ji...@apache.org> on 2020/01/24 17:47:00 UTC

[jira] [Comment Edited] (VELOCITY-926) Regression: Macro arguments names cannot collide with external references names

    [ https://issues.apache.org/jira/browse/VELOCITY-926?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17023139#comment-17023139 ] 

Thomas Mortagne edited comment on VELOCITY-926 at 1/24/20 5:46 PM:
-------------------------------------------------------------------

bq. Could you give me an example where the former behavior would be important for backward compatibility?

Any change is important for backward compatibility. As usual I'm not discussing how valid this behavior is but the fact that this behavior is expected and will break things.


was (Author: tmortagne):
bq. Could you give me an example where the former behavior would be important for backward compatibility?

Any change is important for backward compatibility. As usuall I'm not discussing how valid this behavior is but the fact that this behavior is expected and will break things.

> Regression: Macro arguments names cannot collide with external references names
> -------------------------------------------------------------------------------
>
>                 Key: VELOCITY-926
>                 URL: https://issues.apache.org/jira/browse/VELOCITY-926
>             Project: Velocity
>          Issue Type: Bug
>          Components: Engine
>    Affects Versions: 2.0, 2.1
>            Reporter: Claude Brisson
>            Assignee: Claude Brisson
>            Priority: Major
>             Fix For: 2.2
>
>
> Consider the following example:
> {code}
> #macro( test $foo $bar )
>   $foo $bar
> #end
> #set($foo = 'foo')
> #set($bar = 'bar')
> #test( $bar, $foo )
> {code}
> 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.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@velocity.apache.org
For additional commands, e-mail: dev-help@velocity.apache.org