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

Commit b0af930

Browse files
adrpoOpenModelica-Hudson
authored andcommitted
fix for ticket:5133, make impure function calls be parameter expressions
Belonging to [master]: - #2671
1 parent e941483 commit b0af930

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Compiler/NFFrontEnd/NFCall.mo

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -343,8 +343,10 @@ uniontype Call
343343
typed_args := matchedFunc.args;
344344

345345
args := {};
346-
var := if Function.isImpure(func) or Function.isOMImpure(func) // if is impure, make it highest variability
347-
then Variability.CONTINUOUS
346+
// if is impure, make it a parameter expression
347+
// see https://trac.openmodelica.org/OpenModelica/ticket/5133
348+
var := if Function.isImpure(func) or Function.isOMImpure(func)
349+
then Variability.PARAMETER
348350
else Variability.CONSTANT;
349351
for a in typed_args loop
350352
(arg_exp, _, arg_var) := a;

0 commit comments

Comments
 (0)