Skip to content

Commit

Permalink
[NF] Improve EvalConstants.isLocalFunctionVariable.
Browse files Browse the repository at this point in the history
- Don't consider crefs with a class name in them to be references to
  local variables.
  • Loading branch information
perost committed Dec 17, 2019
1 parent 7b1cd62 commit 224c613
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion OMCompiler/Compiler/NFFrontEnd/NFEvalConstants.mo
Expand Up @@ -465,7 +465,9 @@ function isLocalFunctionVariable
protected
InstNode node;
algorithm
if ComponentRef.nodeVariability(cref) <= Variability.PARAMETER then
if ComponentRef.isPackageConstant(cref) then
res := false;
elseif ComponentRef.nodeVariability(cref) <= Variability.PARAMETER then
node := InstNode.derivedParent(ComponentRef.node(ComponentRef.firstNonScope(cref)));
res := InstNode.refEqual(fnNode, node);
else
Expand Down

0 comments on commit 224c613

Please sign in to comment.