add missing list templating logic to fix imports bug

This commit is contained in:
Jonathan Shook
2022-02-17 11:11:39 -06:00
parent 549b143fc7
commit 4b6019e7d0
3 changed files with 23 additions and 14 deletions

View File

@@ -121,6 +121,13 @@ public class ParsedTemplateMap implements LongFunction<Map<String, ?>>, StaticFi
} else if (v instanceof List) {
List<Object> sublist = (List<Object>) v;
ParsedTemplateList subtpl = new ParsedTemplateList(sublist, bindings, cfgsources);
if (subtpl.isStatic()) {
statics.put(k, sublist);
protomap.put(k, sublist);
} else {
dynamics.put(k,subtpl);
protomap.put(k,null);
}
} else {
// Eventually, nested and mixed static dynamic structure could be supported, but
// it would be complex to implement and also not that efficient, so let's just copy