HubSpot / jinjava

Jinja template engine for Java
Apache License 2.0
690 stars 168 forks source link

Always try to resolve a PartiallyDeferredValue if possible #1165

Closed jasmith-hs closed 6 months ago

jasmith-hs commented 6 months ago

If we preserve the PartiallyDeferredValue's identifier, we'd end up with a result like:

{% set list = [] %}{% do list.append(bar['deferred']) %}{% print list %}

And we wouldn't know what bar refers to since it's a PartiallyDeferedValue, we'll never explicitly reconstruct it, so we have to try to resolve it to it's PyishSerializable value here.