Skip to content

Commit

Permalink
Fix for #3633.
Browse files Browse the repository at this point in the history
- Don't generate result assignment when match is used as a
  non-returning call.
  • Loading branch information
perost authored and OpenModelica-Hudson committed Jan 21, 2016
1 parent 9f7f95e commit 8c9025a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Compiler/Template/CodegenCFunctions.tpl
Expand Up @@ -6518,7 +6518,7 @@ template daeExpMatchCases(list<MatchCase> cases, list<Exp> tupleAssignExps, DAE.
/* Check guard condition after assignments */
if (!<%daeExp(exp,context,&preGuardCheck,&varDeclsCaseInner, &auxFunction)%>) <%onPatternFail%>;<%\n%>
>>)
let caseRes = (match c.result
let caseRes = match res case "" then "" else (match c.result
case SOME(TUPLE(PR=exps)) then
(exps |> e hasindex i1 fromindex 1 =>
'<%getTempDeclMatchOutputName(exps, res, startIndexOutputs, i1)%> = <%daeExp(e,context,&preRes,&varDeclsCaseInner, &auxFunction)%>;<%\n%>')
Expand Down

0 comments on commit 8c9025a

Please sign in to comment.