Skip to content

Commit

Permalink
Fix isSeedCref (#11545)
Browse files Browse the repository at this point in the history
  • Loading branch information
phannebohm committed Nov 9, 2023
1 parent cf7557d commit d3d5d8f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions OMCompiler/Compiler/BackEnd/Differentiate.mo
Expand Up @@ -1325,13 +1325,13 @@ algorithm
end createSeedCrefName;

public function isSeedCref
"Returns true if the cref is prefixed with '$SEED'"
"Returns true if the last cref part is prefixed with 'Seed', i.e. x.y.z.SeedLSJac0"
input DAE.ComponentRef cr;
output Boolean b;
algorithm
b := match cr
case DAE.CREF_IDENT() then StringUtil.startsWith(cr.ident, "Seed");
case DAE.CREF_QUAL() then StringUtil.startsWith(cr.ident, "Seed");
case DAE.CREF_QUAL() then isSeedCref(cr.componentRef);
else false;
end match;
end isSeedCref;
Expand Down

0 comments on commit d3d5d8f

Please sign in to comment.