diff --git a/Compiler/Expression.mo b/Compiler/Expression.mo index 10f9c9a1ed0..c4e73fe8e66 100644 --- a/Compiler/Expression.mo +++ b/Compiler/Expression.mo @@ -3433,7 +3433,7 @@ algorithm case (e,rel,ext_arg) equation str = ExpressionDump.printExpStr(e); - str = "Expression.traverseExp not implemented correctly: " +& str; + str = "Expression.traverseExp or one of the user-defined functions using it is not implemented correctly: " +& str; Error.addMessage(Error.INTERNAL_ERROR, {str}); then fail(); diff --git a/Compiler/SimCode.mo b/Compiler/SimCode.mo index 1a82d9e7018..7f2be80ea6f 100644 --- a/Compiler/SimCode.mo +++ b/Compiler/SimCode.mo @@ -2138,8 +2138,7 @@ algorithm list expl; equation true = RTOpts.acceptMetaModelicaGrammar(); - expl = Algorithm.getAllExps(algorithm_); - expl = getMatchingExpsList(expl, matchMetarecordCalls); + expl = BackendDAEUtil.traverseAlgorithmExps(algorithm_, matchMetarecordCalls, {}); (accRecDecls,rt_2) = elaborateRecordDeclarationsForMetarecords(expl, accRecDecls, rt); //TODO: ? what about rest ? , can be there something else after the ALGORITHM (accRecDecls,rt_2) = elaborateRecordDeclarations(rest, accRecDecls, rt_2); @@ -7441,6 +7440,7 @@ algorithm e2 = Expression.makeCrefExp(cref,DAE.ET_FUNCTION_REFERENCE_VAR()); then ((e,e2::acc)); + case itpl then itpl; end matchcontinue; end matchFnRefs;