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

Commit bbc721e

Browse files
perostOpenModelica-Hudson
authored andcommitted
[NF] Use System.setUsesCardinality.
- Call System.setUsesCardinality to indicate whether the model uses cardinality or not, instead of just using whatever value it happens to be set to. Belonging to [master]: - #2913
1 parent d255b3a commit bbc721e

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

Compiler/NFFrontEnd/NFBuiltinCall.mo

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1311,6 +1311,8 @@ protected
13111311
ty := Type.INTEGER();
13121312
callExp := Expression.CALL(Call.makeTypedCall(fn, {arg}, var, ty));
13131313
// TODO: Check cardinality restrictions, 3.7.2.3.
1314+
1315+
System.setUsesCardinality(true);
13141316
end typeCardinalityCall;
13151317

13161318
function typeBranchCall

Compiler/NFFrontEnd/NFInst.mo

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,8 @@ algorithm
123123
Flags.set(Flags.NF_EXPAND_FUNC_ARGS, false);
124124
end if;
125125

126+
System.setUsesCardinality(false);
127+
126128
// Create a root node from the given top-level classes.
127129
top := makeTopNode(program);
128130
name := Absyn.pathString(classPath);

0 commit comments

Comments
 (0)