-
Notifications
You must be signed in to change notification settings - Fork 297
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Propagate binding equations on redeclared components.
- Loading branch information
Showing
4 changed files
with
78 additions
and
7 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,33 @@ | ||
// name: RedeclareMod8 | ||
// keywords: | ||
// status: correct | ||
// cflags: -d=newInst | ||
// | ||
|
||
record A | ||
Real x; | ||
end A; | ||
|
||
model PB | ||
replaceable parameter A a; | ||
end PB; | ||
|
||
model B | ||
extends PB; | ||
end B; | ||
|
||
model C | ||
replaceable parameter A[1] na; | ||
replaceable B[1] nb; | ||
end C; | ||
|
||
model RedeclareMod8 | ||
C c(nb(redeclare A a = c.na)); | ||
end RedeclareMod8; | ||
|
||
// Result: | ||
// class RedeclareMod8 | ||
// parameter Real c.na[1].x; | ||
// parameter Real c.nb[1].a.x = c.na[1].x; | ||
// end RedeclareMod8; | ||
// endResult |