Skip to content
This repository was archived by the owner on May 18, 2019. It is now read-only.

Commit 027e5cb

Browse files
perostOpenModelica-Hudson
authored andcommitted
[NF] Fill in dims when creating DAE.Element.VAR.
Belonging to [master]: - #2200
1 parent 3bd1e3c commit 027e5cb

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

Compiler/NFFrontEnd/NFConvertDAE.mo

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ import ClassTree = NFClassTree;
6161
import NFPrefixes.Visibility;
6262
import NFPrefixes.Direction;
6363
import Variable = NFVariable;
64+
import ComponentReference;
6465

6566
public
6667
function 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);
115116
end convertVariable;
116117

117118
function 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;
128130
protected
@@ -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

Comments
 (0)