-
Notifications
You must be signed in to change notification settings - Fork 170
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Handle deferred modification of an outer scoped variable inside a cal…
…l tag
- Loading branch information
1 parent
8a0257a
commit 273930e
Showing
5 changed files
with
122 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
src/test/resources/eager/handles-deferred-modification-in-caller.expected.expected.jinja
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
['a', 'b', 'c'] | ||
|
||
['a', 'b', 'c', 'd'] |
6 changes: 6 additions & 0 deletions
6
src/test/resources/eager/handles-deferred-modification-in-caller.expected.jinja
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{% set my_list = ['a', 'b'] %}{% set __macro_callerino_729568755_temp_variable_0__ %} | ||
{% do my_list.append(deferred) %} | ||
{{ my_list }} | ||
{% do my_list.append('d') %}{% endset %}{% call __macro_callerino_729568755_temp_variable_0__ %}{% do my_list.append(deferred) %} | ||
{{ my_list }}{% endcall %} | ||
{{ my_list }} |
11 changes: 11 additions & 0 deletions
11
src/test/resources/eager/handles-deferred-modification-in-caller.jinja
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{% macro callerino() -%} | ||
{% do my_list.append('b') %} | ||
{{ caller() }} | ||
{% do my_list.append('d') %} | ||
{%- endmacro %} | ||
{% set my_list = ['a'] %} | ||
{% call callerino() -%} | ||
{% do my_list.append(deferred) %} | ||
{{ my_list }} | ||
{%- endcall %} | ||
{{ my_list }} |