diff --git a/Compiler/FrontEnd/Inline.mo b/Compiler/FrontEnd/Inline.mo index 970278583b..b87c275476 100644 --- a/Compiler/FrontEnd/Inline.mo +++ b/Compiler/FrontEnd/Inline.mo @@ -1136,8 +1136,7 @@ algorithm equation // use type of cref, since var type is different // and has no hint on array or record type - tp = ComponentReference.crefTypeFull(cr); - oBody = listAppend(oBody, {DAE.STMT_ASSIGN(exp1 = Expression.crefExp(cr), exp = exp, source=DAE.emptyElementSource, type_=tp)}); + oRepl = addOptBindingReplacements(cr,binding,oRepl); oOutputs = cr :: oOutputs; then ();