Skip to content

Commit

Permalink
Fix for #4606.
Browse files Browse the repository at this point in the history
  • Loading branch information
perost authored and OpenModelica-Hudson committed Nov 2, 2017
1 parent 0a64f00 commit 7e6dbfd
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions Compiler/FrontEnd/InstVar.mo
Expand Up @@ -1329,7 +1329,7 @@ protected function stripRecordDefaultBindingsFromElement
output DAE.Element outVar;
output list<DAE.Element> outEqs;
algorithm
(outVar, outEqs) := match(inVar, inEqs)
(outVar, outEqs) := matchcontinue (inVar, inEqs)
local
DAE.ComponentRef var_cr, eq_cr;
list<DAE.Element> rest_eqs;
Expand All @@ -1343,8 +1343,15 @@ algorithm
then
(DAEUtil.setElementVarBinding(inVar, NONE()), rest_eqs);

case (DAE.VAR(componentRef = var_cr),
DAE.COMPLEX_EQUATION(lhs = DAE.CREF(componentRef = eq_cr)) :: _)
algorithm
true := ComponentReference.crefPrefixOf(eq_cr, var_cr);
then
(DAEUtil.setElementVarBinding(inVar, NONE()), inEqs);

else (inVar, inEqs);
end match;
end matchcontinue;
end stripRecordDefaultBindingsFromElement;

protected function checkDimensionGreaterThanZero
Expand Down

0 comments on commit 7e6dbfd

Please sign in to comment.