Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow looking up functions in nested components (#8444)
- Allow comp1..compN.class1..classN.function(), previously only comp.class1..classN.function() was allowed. Fixes #8428
- Loading branch information
Showing
7 changed files
with
61 additions
and
28 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,6 +31,7 @@ redeclare | |
Modelica | ||
lhs | ||
CN | ||
cN | ||
classDirectory | ||
DAE | ||
FMU | ||
|
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,30 @@ | ||
// name: FuncViaComp3 | ||
// keywords: | ||
// status: correct | ||
// cflags: -d=newInst | ||
// | ||
// Checks that functions can be called via components. | ||
// | ||
|
||
|
||
model A | ||
function f | ||
input Integer n; | ||
output Real x = 2; | ||
end f; | ||
end A; | ||
|
||
model B | ||
A a; | ||
end B; | ||
|
||
model FuncViaComp3 | ||
B b; | ||
Real x = b.a.f(1); | ||
end FuncViaComp3; | ||
|
||
// Result: | ||
// class FuncViaComp3 | ||
// Real x = 2.0; | ||
// end FuncViaComp3; | ||
// 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
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