File tree Expand file tree Collapse file tree
main/java/com/hubspot/jinjava/lib/tag/eager
test/java/com/hubspot/jinjava/lib/fn/eager Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ public String eagerInterpret(
4141 InterpretException e
4242 ) {
4343 interpreter .getContext ().checkNumberOfDeferredTokens ();
44- try (InterpreterScopeClosable c = interpreter .enterScope ()) {
44+ try (InterpreterScopeClosable c = interpreter .enterNonStackingScope ()) {
4545 MacroFunction caller = new MacroFunction (
4646 tagNode .getChildren (),
4747 "caller" ,
Original file line number Diff line number Diff line change @@ -77,6 +77,20 @@ public void itReconstructsForAliasedName() {
7777 .isEqualTo (String .format (codeFormat , fullName ));
7878 }
7979
80+ @ Test
81+ public void itResolvesFromSet () {
82+ String template =
83+ "{% macro foo(foobar, other) %}" +
84+ " {% do foobar.update({'a': 'b'} ) %} " +
85+ " {{ foobar }} and {{ other }}" +
86+ "{% endmacro %}" +
87+ "{% set bar = {} %}" +
88+ "{% call foo(bar, deferred) %} {% endcall %}" +
89+ "{{ bar }}" ;
90+ String firstPass = interpreter .render (template );
91+ assertThat (firstPass ).isEqualTo (template );
92+ }
93+
8094 @ Test
8195 public void itReconstructsImageWithNamedParams () {
8296 String name = "foo" ;
You can’t perform that action at this time.
0 commit comments