Fixed more than one collection of the same type causing compiler errors

This commit is contained in:
Alexey Chubar 2023-10-13 18:17:34 +04:00
parent 1bf00c816f
commit d0df923c43
1 changed files with 7 additions and 4 deletions

View File

@ -1,4 +1,3 @@
{% macro decl_units(meta) %}
{%- for u in meta.getunits ~%}
@ -17,7 +16,7 @@
{% endmacro %}
{% macro decl_struct(o, extra = '') %}
{% macro decl_struct(o, allow_diffs = true, extra = '') %}
{% set pkey_fields = token(o, 'table_pkey')|split(',') %}
{% set pkey = o.fields|filter(f => f.name in pkey_fields ) %}
@ -111,7 +110,7 @@ public {{_self.struct_type(o)}} {{o.name}} {{_self.base_struct_class(o)}}
}
{%- endif -%}
{%- if has_token(o, 'diffable') ~%}
{%- if has_token(o, 'diffable') and allow_diffs ~%}
{{_self.diffable_support(o)}}
{%- endif -%}
@ -378,8 +377,12 @@ public class {{o.name}} : IRpc
return !no_changes;
}
{% set unique_diff_units = [] %}
{% for u in get_diff_related_units(o) %}
{{_self.diff_methods_for(u)}}
{% if u not in unique_diff_units %}
{{_self.diff_methods_for(u)}}
{% set unique_diff_units = unique_diff_units|merge([u]) %}
{% endif %}
{% endfor %}
{% endmacro %}