Skip to content

Commit d4e1139

Browse files
committed
Fix for #2496:
- Fixed code generation for arrays in Susan. git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@18367 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
1 parent 01c098b commit d4e1139

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

Compiler/susan_codegen/TplCodegen.mo

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -812,8 +812,9 @@ algorithm
812812
case ( txt,
813813
TplAbsyn.ARRAY_TYPE(ofType = i_ofType) )
814814
equation
815+
txt = Tpl.writeTok(txt, Tpl.ST_STRING("array<"));
815816
txt = typeSig(txt, i_ofType);
816-
txt = Tpl.writeTok(txt, Tpl.ST_STRING("[:]"));
817+
txt = Tpl.writeTok(txt, Tpl.ST_STRING(">"));
817818
then txt;
818819

819820
case ( txt,

Compiler/susan_codegen/TplCodegen.tpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ end typedIdentsEx;
124124
template typeSig(TypeSignature it) ::=
125125
match it
126126
case LIST_TYPE(__) then 'list<<%typeSig(ofType)%>>'
127-
case ARRAY_TYPE(__) then '<%typeSig(ofType)%>[:]'
127+
case ARRAY_TYPE(__) then 'array<<%typeSig(ofType)%>>'
128128
case OPTION_TYPE(__) then 'Option<<%typeSig(ofType)%>>'
129129
case TUPLE_TYPE(__) then 'tuple<<%ofTypes |> it => typeSig(it);separator=", "%>>'
130130
case NAMED_TYPE(__) then pathIdent(name)

0 commit comments

Comments
 (0)