-
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.
Fix PrefixToPreserveState creation by operating against
DeferredLazyReference and not LazyReference. This was the intended functionality to make sure that the order of reconstructed values was such that {% set foo = [] %}{% set bar = foo %}, rather than {% set bar = foo %}{% set foo = [] %} would happen
- Loading branch information
1 parent
7486760
commit b2e9fb2
Showing
6 changed files
with
27 additions
and
5 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
5 changes: 5 additions & 0 deletions
5
...t/resources/eager/handles-duplicate-variable-reference-modification-2/test.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,5 @@ | ||
{% set foo = ['a', 1] %}{% set bar = foo %}{% if deferred %} | ||
{% do bar.append(2) %} | ||
{% endif %} | ||
{% do bar.append(3) %} | ||
{{ foo ~ 'and' ~ bar }} |
8 changes: 8 additions & 0 deletions
8
src/test/resources/eager/handles-duplicate-variable-reference-modification-2/test.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,8 @@ | ||
{% set foo = ['a'] -%} | ||
{%- set bar = foo -%} | ||
{% do bar.append(1) %} | ||
{% if deferred %} | ||
{% do bar.append(2) %} | ||
{% endif %} | ||
{% do bar.append(3) %} | ||
{{ foo ~ 'and' ~ bar }} |
File renamed without changes.
File renamed without changes.