Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve handling of conditional components (#7783)
- Use the condition directly instead of replacing components when determining if a component is deleted, to allow deleting components in only some elements of an array.
- Loading branch information
Showing
5 changed files
with
40 additions
and
75 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// name: Condition7 | ||
// keywords: | ||
// status: correct | ||
// cflags: -d=newInst | ||
// | ||
// | ||
|
||
model A | ||
parameter Boolean b; | ||
Real x if b; | ||
end A; | ||
|
||
model Condition7 | ||
A a[3](b = {false, true, false}); | ||
end Condition7; | ||
|
||
// Result: | ||
// class Condition7 | ||
// final parameter Boolean a[1].b = false; | ||
// final parameter Boolean a[2].b = true; | ||
// Real a[2].x; | ||
// final parameter Boolean a[3].b = false; | ||
// end Condition7; | ||
// 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