Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Evaluate HideResult annotations (#12220)
- Rewrite `Variable.propagateAnnotation` to optionally evaluate the annotation value and use it when propagating HideResult. - Remove the annotation field from `Component.COMPONENT` since it's not actually used anywhere.
- Loading branch information
Showing
11 changed files
with
99 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
// name: HideResult1 | ||
// keywords: | ||
// status: correct | ||
// cflags: -d=newInst --showAnnotations | ||
// | ||
// | ||
|
||
model A | ||
Real x; | ||
Real y annotation(HideResult = false); | ||
end A; | ||
|
||
model B | ||
A a1 annotation(HideResult = true); | ||
A a2; | ||
Real z; | ||
end B; | ||
|
||
model HideResult1 | ||
B b1 annotation(HideResult = false); | ||
parameter Boolean hide = true; | ||
B b2 annotation(HideResult = hide); | ||
end HideResult1; | ||
|
||
// Result: | ||
// class HideResult1 | ||
// Real b1.a1.x annotation(HideResult = true); | ||
// Real b1.a1.y annotation(HideResult = false); | ||
// Real b1.a2.x annotation(HideResult = false); | ||
// Real b1.a2.y annotation(HideResult = false); | ||
// Real b1.z annotation(HideResult = false); | ||
// parameter Boolean hide = true; | ||
// Real b2.a1.x annotation(HideResult = true); | ||
// Real b2.a1.y annotation(HideResult = false); | ||
// Real b2.a2.x annotation(HideResult = true); | ||
// Real b2.a2.y annotation(HideResult = false); | ||
// Real b2.z annotation(HideResult = true); | ||
// end HideResult1; | ||
// endResult |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters