Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Belonging to [master]: - OpenModelica/OMCompiler#2155 - OpenModelica/OpenModelica-testsuite#837
- Loading branch information
1 parent
61c89af
commit 336fb47
Showing
3 changed files
with
46 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
within ; | ||
package Ticket4674 | ||
model BaseRecord | ||
parameter Real a = 1; | ||
parameter Real b = 1; | ||
parameter Real c = 1; | ||
annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(coordinateSystem( | ||
preserveAspectRatio=false))); | ||
end BaseRecord; | ||
|
||
model SpecialRecord | ||
extends Ticket4674.BaseRecord( | ||
a = 2.1, | ||
b = 4.1, | ||
c = 8.1); | ||
extends Ticket4674.Base2(d = 16.1); | ||
parameter Real e = 32.1; | ||
|
||
annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(coordinateSystem( | ||
preserveAspectRatio=false))); | ||
end SpecialRecord; | ||
|
||
model Base2 | ||
parameter Real d = 1; | ||
annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(coordinateSystem( | ||
preserveAspectRatio=false))); | ||
end Base2; | ||
end Ticket4674; |
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,17 @@ | ||
// name: Ticket4674.mos | ||
// keywords: API | ||
// status: correct | ||
// | ||
// API to get the instantiated parameters and constants | ||
// | ||
|
||
|
||
loadFile("Ticket4674.mo"); | ||
getInstantiatedParametersAndValues(Ticket4674.SpecialRecord); getErrorString(); | ||
|
||
|
||
// Result: | ||
// true | ||
// {"a = 2.1","b = 4.1","c = 8.1","d = 16.1","e = 32.1"} | ||
// "" | ||
// endResult |