@@ -61,6 +61,7 @@ import ClassTree = NFClassTree;
6161import NFPrefixes.Visibility ;
6262import NFPrefixes.Direction ;
6363import Variable = NFVariable ;
64+ import ComponentReference ;
6465
6566public
6667function convert
@@ -111,7 +112,7 @@ algorithm
111112 binding_exp := convertBinding(var . binding);
112113 var_attr := convertVarAttributes(var . typeAttributes, var . ty);
113114 daeVar := makeDAEVar(var . name, var . ty, binding_exp, var . attributes,
114- var . visibility, var_attr, var . comment, useLocalDir, var . info);
115+ var . visibility, var_attr, var . comment, useLocalDir, false , var . info);
115116end convertVariable;
116117
117118function makeDAEVar
@@ -123,6 +124,7 @@ function makeDAEVar
123124 input Option < DAE . VariableAttributes > vattr;
124125 input Option < SCode . Comment > comment;
125126 input Boolean useLocalDir;
127+ input Boolean isFunctionParam;
126128 input SourceInfo info;
127129 output DAE . Element var ;
128130protected
@@ -154,7 +156,7 @@ algorithm
154156 Prefixes . visibilityToDAE(vis),
155157 dty,
156158 binding,
157- {} ,
159+ if isFunctionParam then {} else ComponentReference . crefDims(dcref) ,
158160 Prefixes . connectorTypeToDAE(attr. connectorType),
159161 source,
160162 vattr,
@@ -952,7 +954,7 @@ algorithm
952954 var_attr := convertVarAttributes(ty_attr, ty);
953955 attr := comp. attributes;
954956 then
955- makeDAEVar(cref, ty, binding, attr, InstNode . visibility(node), var_attr, comp. comment, true , info);
957+ makeDAEVar(cref, ty, binding, attr, InstNode . visibility(node), var_attr, comp. comment, true , true , info);
956958
957959 else
958960 algorithm
0 commit comments