[ https://issues.apache.org/jira/browse/VELOCITY-926?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17024342#comment-17024342 ]
Thomas Mortagne edited comment on VELOCITY-926 at 1/27/20 1:39 PM: ------------------------------------------------------------------- bq. That's why I was asking for a specific use case What I can tell you is that we did fixed several codes in XWiki Standard doing that but I agree with you that it was mistakes in both cases. So yes I don't have a strong use case to describe but any weird behavior always end up being expected and used in 10 years :) From what I understand the reason for this behavior in 1.7 is a side effect of the local macro context (the macro parameter being unset in the local context but variables were also fallbacking to global context when unset) which does not exist anymore and I guess it not really easy to get back this behavior without getting back the local macro context which you said you did not wanted anymore even as a retro compatible option. was (Author: tmortagne): bq. That's why I was asking for a specific use case What I can tell you is that we did fixed several codes in XWiki Standard doing that but I agree with you that it was mistakes in both cases. So yes I don't have a strong use case to describe but any weird behavior always end up being expected and used in 10 years :) From what I understand the reason for this behavior in 1.7 is a side effect of the local macro context which does not exist anymore and I guess it not really easy to get back this behavior without getting back the local macro context which you said you did not wanted anymore even as a retro compatible option. > 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-unsubscr...@velocity.apache.org For additional commands, e-mail: dev-h...@velocity.apache.org