Changeset a3d7c1ef in OpenModelica


Ignore:
Timestamp:
2021-01-21T23:46:53+01:00 (3 years ago)
Author:
Per Östlund <perost86@…>
Parents:
116b4405
git-author:
Per Östlund <perost86@…> (01/21/21 23:45:13)
git-committer:
Per Östlund <perost86@…> (01/21/21 23:46:53)
Message:

Workaround for #7097

File:
1 edited

Legend:

Unmodified
Added
Removed
  • OMCompiler/Compiler/NFFrontEnd/NFFlatten.mo

    r6d0af09 ra3d7c1ef  
    574574  Binding binding;
    575575  Option<Binding> opt_binding;
    576   Expression binding_exp;
     576  Expression binding_exp, binding_exp_eval;
    577577  Equation eq;
    578578  list<Expression> bindings;
     
    593593    elseif binding_var == Variability.PARAMETER and Component.isFinal(comp) then
    594594      try
    595         binding_exp := Expression.stripBindingInfo(Ceval.evalExp(binding_exp));
     595        binding_exp_eval := Expression.stripBindingInfo(Ceval.evalExp(binding_exp));
     596        // Throw away the evaluated binding if the number of dimensions no
     597        // longer match after evaluation, in case Ceval fails to apply the
     598        // subscripts correctly.
     599        // TODO: Fix this, it shouldn't be needed.
     600        0 := Type.dimensionDiff(ty, Expression.typeOf(binding_exp_eval));
     601        binding_exp := binding_exp_eval;
    596602      else
    597603      end try;
Note: See TracChangeset for help on using the changeset viewer.