@@ -146,7 +146,7 @@ algorithm
146146 execStat("NFInst.instExpressions(" + name + ")" );
147147
148148 // Mark structural parameters.
149- updateImplicitVariability(inst_cls);
149+ updateImplicitVariability(inst_cls, Flags . isSet( Flags . EVAL_PARAM ) );
150150 execStat("NFInst.updateImplicitVariability" );
151151
152152 // Type the class.
@@ -2881,6 +2881,7 @@ end insertGeneratedInners;
28812881
28822882function updateImplicitVariability
28832883 input InstNode node;
2884+ input Boolean evalAllParams;
28842885protected
28852886 Class cls = InstNode . getClass(node);
28862887 ClassTree cls_tree;
@@ -2890,7 +2891,7 @@ algorithm
28902891 algorithm
28912892 for c in cls_tree. components loop
28922893 if not InstNode . isEmpty(c) then
2893- updateImplicitVariabilityComp(c);
2894+ updateImplicitVariabilityComp(c, evalAllParams );
28942895 end if ;
28952896 end for ;
28962897
@@ -2906,14 +2907,14 @@ algorithm
29062907 markStructuralParamsDim(dim);
29072908 end for ;
29082909
2909- updateImplicitVariability(cls. baseClass);
2910+ updateImplicitVariability(cls. baseClass, evalAllParams );
29102911 then
29112912 ();
29122913
29132914 case Class . INSTANCED_BUILTIN (elements = cls_tree as ClassTree . FLAT_TREE ())
29142915 algorithm
29152916 for c in cls_tree. components loop
2916- updateImplicitVariabilityComp(c);
2917+ updateImplicitVariabilityComp(c, evalAllParams );
29172918 end for ;
29182919 then
29192920 ();
@@ -2924,6 +2925,7 @@ end updateImplicitVariability;
29242925
29252926function updateImplicitVariabilityComp
29262927 input InstNode component;
2928+ input Boolean evalAllParams;
29272929protected
29282930 InstNode node = InstNode . resolveOuter(component);
29292931 Component c = InstNode . component(node);
@@ -2936,7 +2938,8 @@ algorithm
29362938 algorithm
29372939 // @adrpo: if Evaluate=true make the parameter a structural parameter
29382940 // only make it a structural parameter if is not constant, duh!, 1071 regressions :)
2939- if c. attributes. variability == Variability . PARAMETER and Component . getEvaluateAnnotation(c) then
2941+ if c. attributes. variability == Variability . PARAMETER and
2942+ (Component . getEvaluateAnnotation(c) or evalAllParams) then
29402943 markStructuralParamsComp(c, node);
29412944 end if ;
29422945
@@ -2952,7 +2955,7 @@ algorithm
29522955 markStructuralParamsExp(Binding . getUntypedExp(condition));
29532956 end if ;
29542957
2955- updateImplicitVariability(c. classInst);
2958+ updateImplicitVariability(c. classInst, evalAllParams );
29562959 then
29572960 ();
29582961
0 commit comments