Skip to content

Commit

Permalink
Fix assignment to records in tuple assignment calls
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@16681 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
sjoelund committed Jul 25, 2013
1 parent 20239aa commit 7e78e90
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Compiler/Template/CodegenC.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -3403,8 +3403,9 @@ template contextCref(ComponentRef cr, Context context)
>>
else
match context
case FUNCTION_CONTEXT(__) then "_" + System.unquoteIdentifier(crefStr(cr))
case PARALLEL_FUNCTION_CONTEXT(__) then "_" + System.unquoteIdentifier(crefStr(cr))
case FUNCTION_CONTEXT(__)
case PARALLEL_FUNCTION_CONTEXT(__)
then "_" + System.unquoteIdentifier(crefStr(cr))
else cref(cr)
end contextCref;

Expand Down Expand Up @@ -5968,7 +5969,7 @@ case CREF(ty= DAE.T_COMPLEX(varLst = varLst, complexClassType=RECORD(__))) then
<<
<%preExp%>
<% varLst |> var as TYPES_VAR(__) hasindex i1 fromindex 0 =>
'<%lhsStr%><%match context case FUNCTION_CONTEXT(__) then "." else "$P"%><%var.name%> = <%rhsStr%>._<%var.name%>;'
'<%lhsStr%><%match context case FUNCTION_CONTEXT(__) then "._" else "$P"%><%var.name%> = <%rhsStr%>._<%var.name%>;'
; separator="\n"
%>
>>
Expand Down

0 comments on commit 7e78e90

Please sign in to comment.