From 01cf43c698d398c19cd34351192663edca71412c Mon Sep 17 00:00:00 2001 From: kabdelhak <38032125+kabdelhak@users.noreply.github.com> Date: Tue, 18 Apr 2023 13:05:06 +0200 Subject: [PATCH] [BE] dont imply protected on hide result (#10566) - fixes #10054 --- OMCompiler/Compiler/BackEnd/BackendVariable.mo | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/OMCompiler/Compiler/BackEnd/BackendVariable.mo b/OMCompiler/Compiler/BackEnd/BackendVariable.mo index c122f8e26f5..b118fb7e98f 100644 --- a/OMCompiler/Compiler/BackEnd/BackendVariable.mo +++ b/OMCompiler/Compiler/BackEnd/BackendVariable.mo @@ -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