Skip to content

Commit

Permalink
[BE] dont imply protected on hide result (#10566)
Browse files Browse the repository at this point in the history
- fixes #10054
  • Loading branch information
kabdelhak committed Apr 18, 2023
1 parent 33a50c3 commit 01cf43c
Showing 1 changed file with 2 additions and 16 deletions.
18 changes: 2 additions & 16 deletions OMCompiler/Compiler/BackEnd/BackendVariable.mo
Expand Up @@ -1611,23 +1611,9 @@ algorithm
end isOutput;

public function isProtectedVar
"Returns the DAE.Protected attribute, overridden with HideResult annotation"
"Returns the DAE.Protected attribute"
input BackendDAE.Var v;
output Boolean hidden;
protected
SCode.Annotation anno;
Absyn.Exp val;
algorithm
try
BackendDAE.VAR(comment=SOME(SCode.COMMENT(annotation_ = SOME(anno)))) := v;
val := SCodeUtil.getNamedAnnotation(anno, "HideResult");
hidden := match(val)
case Absyn.BOOL(true) then true;
else false;
end match;
else
hidden := DAEUtil.getProtectedAttr(v.values);
end try;
output Boolean hidden = DAEUtil.getProtectedAttr(v.values);
end isProtectedVar;

public function isProtected
Expand Down

0 comments on commit 01cf43c

Please sign in to comment.